About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: October 2006

URL: http://cxc.harvard.edu/ciao3.4/dates.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 dates Context: proposaltools

Synopsis

DATES is an interactive calendar and time conversion tool.

Description

DATES can be run over the WWW using a browser, such as Netscape, or run locally using the command-line interface (CLI). The CLI version will accept a text file with a list of dates as input. The CLI version has an expanded list of supported date formats, and also allows timescale conversions (e.g. EST to GMT.)

DATES is part of the Proposal toolkit. The toolkit is distributed with CIAO.

For details about available coordinate and time systems, please see the prop-time and prop-coords ahelp documents.

RUNNING DATES OVER THE WEB

DATES can be accessed via the URL

http://cxc.harvard.edu/toolkit/dates.jsp

Supported date formats include Calendar, Julian, Modified Julian, Day of Year, Chandra Time. A general help file for the Proposal Planning Toolkit is available by clicking the 'HELP' button.

RUNNING DATES USING THE COMMAND-LINE INTERFACE

To run DATES in CLI mode, type 'prop_dates' at the UNIX prompt. To see a list of available commands, type '?', 'help', or 'h'. The command-line interface has additional supported date and time formats. For a complete listing, type 'list/cal' (or 'l/cal') for the list of available calendars and 'list/ts' (or 'l/ts') for available timescales.

The syntax for processing a file of coordinates is:

prop_dates commands:infile:outfile

It is also possible with the CLI to set the printing level for the results, set the zero for a date format and to run a loop conversion. More detail about these features can be found later in this file.

The setup prompt is where the date format is set. For example: 'from JD to ROMAN' (or 'f JD t ROMAN') sets up DATES to convert from Julian Day to the Roman Calendar format.

To perform individual conversions, enter conversion mode by typing 'convert' (or 'c') at the setup prompt. At the conversion prompt, enter the date to be converted, the result will be displayed according to the printing level selected. Type 'quit' (or 'q') to exit conversion mode. Alternately, typing 'eval' (or 'e') at the setup prompt instead of 'convert' will perform a conversion and return to the setup prompt in one step. The command 'do' (or 'd') will perform loop conversion with the syntax:

do date1;date2;step

PRINTING MODES

P2 is the default for interactive mode. Each conversion outputs four lines: a leading banner of dashes, the 'from' info (to check the program has parsed your input correctly), the 'to' info (the result), and a trailing banner of dashes. Each gives the calendar followed by the value.

P1 is the default for batch mode. A single line gives the from and to values side by side, and a header line is issued on entry to convert mode giving the from and to calendars.

P0 is a concise mode which gives only the output value.

Example 1

Dates[Setup]>: to TAI

Dates[Setup]>: convert

Dates [Conversion mode]
Enter "q" to return to setup mode
UTC:1994 Jan 01 14:30:02
------------------------------------------------------------------------
--------
UTC Sat AD 1994 Jan 1 14:30:02 UTC (Gregorian)
TAI Sat AD 1994 Jan 1 14:30:30.00 TAI (Gregorian)
------------------------------------------------------------------------
--------

UTC:q

This series of commands enters the UTC date 1994 Jan 01 14:30:02 and converts it to the TAI date 1994 Jan 01 14:30:30.00.

Example 2

Dates [Setup]>:from greg to time; zero 1994 Jan 0.0

Dates [Setup]>:convert
Dates [Conversion mode]
Enter "q" to return to setup mode
Gregorian date:2002 Aug 15 06:11
------------------------------------------------------------------------
--------
Gregorian date Thu AD 2002 Aug 15 06:11 UTC (Gregorian)
TIME(JD 2452275.5) 272095864
------------------------------------------------------------------------
--------

This example sets the zero point in GREG to 1994 Jan 0.0 and then converts the GREG date 2002 AUG 15 06:11 to the TIME 272095864 (versus 145779061 without the zero point change).

Example 3

Dates [Setup]>:P0
Dates [Setup]>:f MST
Dates [Setup]>:t PDT
Dates [Setup]>:e 2002 Jan 14:30:08.2
SIMPLE DAY
Sun AD 2002 Jan 13 13:00:00.00 PDT (Gregorian)

This example sets the print mode to 0 and converts a MST date to a PDT date, exiting DATES upon completion.

Example 4

If an infile is present, DATES enters batch mode and reads a series of dates from infile, converting each one and printing the output in outfile (which defaults to the terminal).

'prop_dates from EST to TAI:date_list.in:date_list.out' where date_list.in contains:

	
	1993 Jun 30 06:00 
	1993 Jun 30 23:30 
	1993 Jul  1 00:30 
	1993 Jun 30 18:59:59 
	1993 Jun 30 18:59:60 
	1993 Jun 30 19:00:00 
	1993 Jun 30 23:59:59 
	1993 Jul  1 00:00:00 

Then date_list.out will contain the same dates converted from Eastern Standard Time (EST) to International Atomic Time (TAI).

EST                                     TAI
Wed AD 1993 Jun 30  06:00       EST (Gregorian)              Wed AD 1993 Jun 30  11:00:27.00 TAI (Gregorian)
Wed AD 1993 Jun 30  23:30       EST (Gregorian)              Thu AD 1993 Jul  1  04:30:28.00 TAI (Gregorian)
Thu AD 1993 Jul  1  00:30       EST (Gregorian)              Thu AD 1993 Jul  1  05:30:28.00 TAI (Gregorian)
Wed AD 1993 Jun 30  18:59:59    EST (Gregorian)              Thu AD 1993 Jul  1  00:00:26.00 TAI (Gregorian)
qWed AD 1993 Jun 30  18:59:60    EST (Gregorian)              Thu AD 1993 Jul  1  00:00:27.00 TAI (Gregorian)
Wed AD 1993 Jun 30  19:00:00    EST (Gregorian)              Thu AD 1993 Jul  1  00:00:28.00 TAI (Gregorian)
Wed AD 1993 Jun 30  23:59:59    EST (Gregorian)              Thu AD 1993 Jul  1  05:00:27.00 TAI (Gregorian)

Example 5

Convert July 25, 2002 to Chandra Time

Dates [Setup]>:to time
Dates [Setup]>:convert
Dates [Conversion mode]
Enter "q" to return to setup mode
Gregorian date:2002 Jul 25
--------------------------------------------------------------------------------
Gregorian date          Thu AD 2002 Jul 25              UTC (Gregorian)
TIME(JD 2450814.5)      143942401
--------------------------------------------------------------------------------
Hardcopy (PDF): A4 | Letter
Last modified: October 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.