RE: Julian Date Format output 0YYDDD
I have a udf, will that do? Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 11:57 AM To: CF-Talk Subject: Julian Date Format output 0YYDDD Does someone have a function built to convert the current date to a julian format? Thanks, Charles Nahm Sonic Networks Inc. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
What is julian exactly? Just curious? Please give an example. Thanks, Jim Vosika http://www.softwaresupermall.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:57 AM To: CF-Talk Subject: Julian Date Format output 0YYDDD Does someone have a function built to convert the current date to a julian format? Thanks, Charles Nahm Sonic Networks Inc. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Julian Date Format output 0YYDDD
The Julian Calendar is named after Julius Caeser On Tuesday, June 25, 2002, at 09:00 AM, Jim Vosika wrote: What is julian exactly? Just curious? Please give an example. Thanks, Jim Vosika http://www.softwaresupermall.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:57 AM To: CF-Talk Subject: Julian Date Format output 0YYDDD Does someone have a function built to convert the current date to a julian format? Thanks, Charles Nahm Sonic Networks Inc. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
-Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] I have a udf, will that do? Hello Robert, I am not sure what a udf is. If it is something I can learn and use fairly easily, it would be much appreciated. I would welcome any help that will assist me in solving this issue. Thanks, Charles Nahm __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
-Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
That's not how As/400 julian is, it's 102150 Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Julian Date Format output 0YYDDD
julian day/calendar defined at: http://bcn.boulder.co.us/y2k/y2kbcalc.htm http://www.npl.co.uk/npl/ctm/time_scales.html and some calendar systems just for fun: http://webexhibits.org/calendars/calendar-ancient.html though i think what many people mean is the simpler system of the same name--being the number of days elapsed since January 1st of the same year (according to which 2000-12-31 is day 366 of the year 2000). nasa has its own truncated jualian date (from 24-may-1968 when apollo began). in this case, 0YYDDD, don't think its julian anything __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Julian Date Format output 0YYDDD
The Julian Calendar is named after Julius Caeser maybe ;-) either that or this calendar's inventor's dad: julius caesar scaliger. the calendar actually doesn't date from roman time. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
Here is what I have CFSCRIPT /** * Returns a gregorian date if a julian date is submitted, or returns a julian date if a gregorian date is submitted. * * @param date * @param outvar * @return Returns a date. * @author Robert Everland III ([EMAIL PROTECTED]) * @version 1, January 10, 2002 */ function julian(date, date_format) { if (isnumeric(date)) { if (len(date) eq 5) { date = 0 date; } if (left(date,3) LT 100) { yr = 19 right(left(date,3),2); } else { yr = 20 right(left(date,3),2); } days = right(date,3)-1; firstday = 1/1/ yr; return dateformat(dateadd(d,days,firstday),date_format); } else if (isdate(date)) { date = dateformat(date, mm/dd/); if (year(date) eq 1999) { return 0 left(99000+Dayofyear(date),5); } else { return left(1right(date,2)right(00Dayofyear(date),3),6); } } return Not a valid date; } /CFSCRIPT Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
From http://aa.usno.navy.mil/data/docs/JulianDate.html: Julian dates (abbreviated JD) are simply a continuous count of days and fractions since noon Universal Time on January 1, 4713 BCE (on the Julian calendar). Almost 2.5 million days have transpired since this date. Julian dates are widely used as time variables within astronomical software. Typically, a 64-bit floating point (double precision) variable can represent an epoch expressed as a Julian date to about 1 millisecond precision. Note that the time scale that is the basis for Julian dates is Universal Time, and that 0h UT corresponds to a Julian date fraction of 0.5. Regards, Kevin [EMAIL PROTECTED] 06/25/02 09:21AM That's not how As/400 julian is, it's 102150 Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Julian Date Format output 0YYDDD
Julian dates are pre-Gregorian calender (which is what we use now). Banks use them because they aren't affected by the like of the Y2K cock-up, because you just store an integer and convert it to a real date. I should point out that Julian dates are not in the format 0YYDDD Have a look at for a history of the calender http://astro.nmsu.edu/~lhuber/leaphist.html and at http://aa.usno.navy.mil/data/docs/JulianDate.html for an online convertor Regards Stephen - Original Message - From: Charles Nahm [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, June 25, 2002 5:40 PM Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
Thank you Robert. Could you provide a small usage sample for the function? Would it be like: JDate = '#Julian(Now(), '0YYDDD')#' Thanks, Charles Nahm -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:36 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD Here is what I have CFSCRIPT /** * Returns a gregorian date if a julian date is submitted, or returns a julian date if a gregorian date is submitted. * * @param date * @param outvar * @return Returns a date. * @author Robert Everland III ([EMAIL PROTECTED]) * @version 1, January 10, 2002 */ function julian(date, date_format) { if (isnumeric(date)) { if (len(date) eq 5) { date = 0 date; } if (left(date,3) LT 100) { yr = 19 right(left(date,3),2); } else { yr = 20 right(left(date,3),2); } days = right(date,3)-1; firstday = 1/1/ yr; return dateformat(dateadd(d,days,firstday),date_format); } else if (isdate(date)) { date = dateformat(date, mm/dd/); if (year(date) eq 1999) { return 0 left(99000+Dayofyear(date),5); } else { return left(1right(date,2)right(00Dayofyear(date),3),6); } } return Not a valid date; } /CFSCRIPT Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
Charles, I built a whole series of Julian Date Format functions that are available as UDFs at the www.cflib.org web site. JulianDayofWeek: Returns the day of the week for a date in the Julian calendar. Returns the day of the week for a date in the Julian. If no date is provided, defaults to the current day. Verified to be accurate between 400 and AD. GetDateFromJulianDay: Calculates the date and time from a provided Julian Day value. GetDateFromModifiedJulianDay: Calculates the date and time based on a modified Julian Day. GetJulianDay: Calculates the Julian Day for any date in the Gregorian calendar. This function calculates the Julian Day for any date in the Gregorian calendar. Astronomers have used the Julian period to assign a unique number to every day since 1 January 4713 B.C.E. Julian Days begin at noon on the date specified GetModifiedJulianDay: Calculates the modified Julian Day for any date in the Gregorian calendar. Calculates the modified Julian Day for any date in the Gregorian calendar. Sometimes a modified Julian day number (MJD) is used which is 2,400,000.5 less than the Julian day number. This brings the numbers into a more manageable numeric range and makes the day numbers change at midnight UTC rather than noon. MJD 0 thus started on 17 Nov 1858 (Gregorian) at 00:00:00 UTC. I hope these help. Good luck. Beau -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 11:57 AM To: CF-Talk Subject: Julian Date Format output 0YYDDD Does someone have a function built to convert the current date to a julian format? Thanks, Charles Nahm Sonic Networks Inc. __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
#julian(101001, MM/dd/)# =01/01/2001 and #julian(01/01/2001)# = 101001 Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 2:04 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD Thank you Robert. Could you provide a small usage sample for the function? Would it be like: JDate = '#Julian(Now(), '0YYDDD')#' Thanks, Charles Nahm -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:36 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD Here is what I have CFSCRIPT /** * Returns a gregorian date if a julian date is submitted, or returns a julian date if a gregorian date is submitted. * * @param date * @param outvar * @return Returns a date. * @author Robert Everland III ([EMAIL PROTECTED]) * @version 1, January 10, 2002 */ function julian(date, date_format) { if (isnumeric(date)) { if (len(date) eq 5) { date = 0 date; } if (left(date,3) LT 100) { yr = 19 right(left(date,3),2); } else { yr = 20 right(left(date,3),2); } days = right(date,3)-1; firstday = 1/1/ yr; return dateformat(dateadd(d,days,firstday),date_format); } else if (isdate(date)) { date = dateformat(date, mm/dd/); if (year(date) eq 1999) { return 0 left(99000+Dayofyear(date),5); } else { return left(1right(date,2)right(00Dayofyear(date),3),6); } } return Not a valid date; } /CFSCRIPT Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
Missing an end quote in the second example -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:46 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD #julian(101001, MM/dd/)# =01/01/2001 and #julian(01/01/2001)# = 101001 Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 2:04 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD Thank you Robert. Could you provide a small usage sample for the function? Would it be like: JDate = '#Julian(Now(), '0YYDDD')#' Thanks, Charles Nahm -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:36 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD Here is what I have CFSCRIPT /** * Returns a gregorian date if a julian date is submitted, or returns a julian date if a gregorian date is submitted. * * @param date * @param outvar * @return Returns a date. * @author Robert Everland III ([EMAIL PROTECTED]) * @version 1, January 10, 2002 */ function julian(date, date_format) { if (isnumeric(date)) { if (len(date) eq 5) { date = 0 date; } if (left(date,3) LT 100) { yr = 19 right(left(date,3),2); } else { yr = 20 right(left(date,3),2); } days = right(date,3)-1; firstday = 1/1/ yr; return dateformat(dateadd(d,days,firstday),date_format); } else if (isdate(date)) { date = dateformat(date, mm/dd/); if (year(date) eq 1999) { return 0 left(99000+Dayofyear(date),5); } else { return left(1right(date,2)right(00Dayofyear(date),3),6); } } return Not a valid date; } /CFSCRIPT Robert Everland III Web Developer Extraordinaire Dixon Ticonderoga Company http://www.dixonusa.com -Original Message- From: Charles Nahm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:41 PM To: CF-Talk Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Julian Date Format output 0YYDDD
When I was in the USMC we used a Julian date - it was the last two digits of the year followed by the cardinal number of the day of the year. Ex: 1 January 2000 = 1 1 February 1999 = 99032 - Matt Small -Original Message- From: Stephen Moretti [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 12:53 PM To: CF-Talk Subject: Re: Julian Date Format output 0YYDDD Julian dates are pre-Gregorian calender (which is what we use now). Banks use them because they aren't affected by the like of the Y2K cock-up, because you just store an integer and convert it to a real date. I should point out that Julian dates are not in the format 0YYDDD Have a look at for a history of the calender http://astro.nmsu.edu/~lhuber/leaphist.html and at http://aa.usno.navy.mil/data/docs/JulianDate.html for an online convertor Regards Stephen - Original Message - From: Charles Nahm [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, June 25, 2002 5:40 PM Subject: RE: Julian Date Format output 0YYDDD -Original Message- From: Jim Vosika [mailto:[EMAIL PROTECTED]] What is julian exactly? Just curious? Please give an example. Some archaic Unix based date format from what I can see. It is still used by some banks. The format is 0YYDDD, so today would be 002150 (assuming there have been 150 days total this year). Regards, Charles Nahm __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists