1.4.1 split a date/time into a record
Description
splitdate splits a date/time quantity into a record with constituent fields like
year, yearday, month etc. All fields will be integer (to enable use as index and
easy personal formatting), with the exception of the s field which is a double
float. See the example for the fields returned.
Arguments
| Inputs |
| ||
| v |
| angle/time quantity
| |
| allowed: | any |
|
| Default: | variant |
|
Example
"""
# print "\t----\t splitdate Ex 1 \t----" print qa.splitdate(’today’) #{’mjd’: 54175.752367291658, ’week’: 11, ’usec’: 533999, ’hour’: 18, # ’min’: 3, ’yearday’: 75, ’msec’: 533, ’month’: 3, ’s’: # 24.533999226987362, ’sec’: 24, ’weekday’: 5, ’year’: 2007, ’monthday’: # 16} print qa.splitdate(’183.33333333deg’) #{’mjd’: 0.50925925925000004, ’week’: 46, ’usec’: 999999, ’hour’: 12, # ’min’: 13, ’yearday’: 321, ’msec’: 999, ’month’: 11, ’s’: # 19.999999200003487, ’sec’: 19, ’weekday’: 3, ’year’: 1858, # ’monthday’: 17} # """ |
Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu
Copyright © 2008 Associated Universities Inc., Washington, D.C.
This code is available under the terms of the GNU General Public Lincense
Home |
Contact Us |
Directories |
Site Map |
Help |
Privacy Policy |
Search
Updated daily during alpha development.