| ||||||||||||||||
| Home Page | The Sun API | Gallery | InfoSearch | News | Links | Contact Us | ||||||||||||||||
|
Sunlit Design > The Sun API > Documentation > sdMJDx Function | ||||||||||||||||
|
- Introduction + Using the Functions + User Guide + Function Reference + Constants
|
sdMJDx FunctionDescriptionReturns a Modified Julian Day (MJD) time value.sdSDYx converts a Year, Month, Day and 24 hour clock time for a given Timezone into a Modified Julian Day (MJD) value. The sdxAlt, sdxAzi, sdxDecl, sdxEOT, sdxFindAnnFeatx, sdxH, sdxGetv, sdxTime2Text, and sdxTimeUnpackx functions all use MJD time values. SyntaxsdMJDx(year, month, day, hour, minute, second, timezone)
Return ValuessdMJDx returns an XML String. Assuming "nnn" stands for the numeric MJD value that is returned and "tz" the numeric value of the timezone, the MJD time value will have the following format:"nnn <MJD> nnn </MJD><TimeZone> tz </TimeZone>" sdMJDx will return an MJD between -2400000.5 (Noon 1st Jan -4711) and 2973484.9999... (31st Dec 9999) ErrorsIf the function detects an error in any of it's input parameters then it returns: "-99999999<Error>-99999999</Error>" If the function returns an error value, then: RemarksThis function calculates it's return value by finding the MJD of
the beginning of the month for the given year then adding the sum of
the days, hours, timezone, minutes, and seconds. The string MJD time value may be converted to a simple numeric value using the sdxGetv function. The XML string that this function returns has
the numerical value of the result at the beginning of the string followed by the
result in proper XML format. This value is the default numeric value of
the string. It may be returned using the Find the numeric value of the MJD value corresponding to
Midnight UT Jan 1, 2000:
In a MJD time value with an appended Time Zone - for example: The useful resolution of this time measure is approximately 1/10 of a millisecond. ExampleFind the MJD value corresponding to February 23rd 2002, 2:12 pm Eastern Standard
Time (USA) (+5 gives UT):
Find the numeric value of the SDY value corresponding to
November 17th 2004, 7pm in
Amsterdam (not Daylight saving): Find the MJD value corresponding to midday UT, February 29th
2004: Print a list of Solar Declinations (in degrees) for midday in Almaty
Kazakhstan (-6 gives UT) for everyday of the year 2003: |
|
||||||||||||||
| (c) 2001-2012 Sunlit Design www.sunlit-design.com Sat, 04 Feb 2012 04:22:27 PM +700 gives UT | ||||||||||||||||