In Perl and PHP, there are no date objects, at least by default.  They could
of course be written for use by the IO Element files.  In those languages,
I'm just leaving them as a plain string in whatever format they were
received.  In Perl and PHP, time is usually handled in the standard UNIX way
as the number of seconds since January 1, 1970 00:00:00, and usually local
time, not GMT.  In order to create the number of seconds of the UNIX / C
style date/time struct, a POSIX style string is usually sent to a special
function.  For instance, mktime (or gmmktime) in PHP.

int mktime ( [int hour [, int minute [, int second [, int month [, int day
[, int year [, int is_dst]]]]]]])

So in these languages, the raw string argument passed by the JavaScript
IOElement client to the IOElement server script must be processed to break
up the string into the appropriate parameters.  So, as long as we use a
4-digit year we should be able to accept any format, and figure out which
order the string is in, be it yyyy/mm/dd or mm/dd/yyyy.  But I really hope
to avoid the two and three digit years representative as the "number of
years since 1900" as they are problematic.  Anything from 1900-1909 is a 1
digit year, 1910-1999 is a 2-digit year, anything from 2000-2999 is a
three-digit year.  What if you wanted something before 1900?  The UNIX
timestamp is probably even worse.  It's only valid from 1970.  On today's
predominantly 32-bit processors, which means 32-bit integers, the timestamp
can only record the number of seconds through 2037 or 2038, I forget the
exact date.  (That is likely to be a bigger problem than y2k with archaic
embedded systems.  ^^ )

Leif

----- Original Message ----- 
From: "Raymond Irving" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 2:56 PM
Subject: Re: Fw: [Dynapi-Dev] IOElement SODA date format


>
> Well if this format "2001/05/15 09:30:45" works then I
> think we should use it. I don't remember why I used
> mm/dd/yyyy. I thought I had use yyy/mm/dd before but
> had to resort to mm/dd/yyyy. Can't remember why.
>
> More testing might have to be done with yyyy/mm/dd and
> javascript and other server-side languages
>
> --
> Raymond Irving
>
> --- Leif W <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would break up the mm/dd/yyyy hh:nn:ss into the
> > Date( yy, mm, dd, hh, nn,
> > ss ) format, but I am not sure about the y2k
> > compatibility of the year
> > format where it only uses 2 digits, not all four.
> > But in the example it
> > also shows the other date format Date("December 17,
> > 1995 03:24:00") with the
> > 4-digit date format which is ok.  So I don't know if
> > it's just a
> > documentation shortcoming, or something in the
> > browser.  It'll be easy
> > enough to create a date test page with various
> > formats passed to the
> > constructor.
> >
> > (some time passes)
> >
> >
>
http://dynapi.kicks-ass.net/DynAPI_CVSROOT/test/date_format/date_format.html
> >
> > These four formats I tried all work in IE 6, Opera
> > 7.11, Netscape 4.79,
> > Mozilla 1.5, and Mozilla Firebird 0.6.1.  Try
> > testing these and other
> > formats in these and other browsers.
> >
> > 05/15/2001 09:30:45
> > 2001/05/15 09:30:45
> > 2001,04,15,09,30,45
> > May 15, 2001 09:30:45
> >
> > Personally I prefer the second format, putting
> > everything in a more logical
> > order, greatest to least "yyyy/mm/dd hh:nn:ss".  The
> > third format is also
> > logical, but might require further processing (note
> > the month is 0-11, not
> > 1-12).  The fourth format is probably the least
> > desireable, converting a
> > number to a month string.  But maybe we could just
> > write code to handle all
> > four formats, as JavaScript does?  That might make
> > it more flexible for the
> > coders.  Or too confusing?  What do you think?
> >
> > Leif
> >
> > ----- Original Message ----- 
> > From: "Raymond Irving" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, October 17, 2003 10:30 AM
> > Subject: Re: Fw: [Dynapi-Dev] IOElement SODA date
> > format
> >
> >
> > >
> > > Thanks Leif.
> > >
> > > I think the date format "mm/dd/yy hh:nn:ss" works
> > in
> > > ns4 and others or should we break it up to use the
> > > "Date(95,11,17,3,24,0)" format?
> > >
> > > --
> > > Raymond Irving
> > >
> > > --- Leif W <[EMAIL PROTECTED]> wrote:
> > > > Here's a message you may hve missed.
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Leif W" <[EMAIL PROTECTED]>
> > > > To: "DynAPI-Dev"
> > <[EMAIL PROTECTED]>
> > > > Sent: Thursday, October 16, 2003 6:56 PM
> > > > Subject: [Dynapi-Dev] IOElement SODA date format
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > In the docs (quickref.soda) and the code, the
> > date
> > > > format I've seen
> > > > > mentioned or handled is "mm/dd/yyyy hh:nn:ss"
> > but
> > > > I've just come to a
> > > > point
> > > > > in the code in ioelmsrv.soda in ws__SODA2Var
> > under
> > > > 'else if ( tagType ==
> > > > > "d" )', where in the JScript version of the
> > ASP,
> > > > it passes this format
> > > > > string to the JScript Date() object as a
> > > > constructor argument.
> > > > >
> > > > > But looking through the most recent (ok maybe
> > this
> > > > is outdated) JS
> > > > reference
> > > > > manual I could find (Netscape's Core Reference
> > JS
> > > > 1.5), I only found these
> > > > > date formats, not the one being used.  Am I
> > > > missing something?
> > > > >
> > > > > today = new Date()
> > > > > birthday = new Date("December 17, 1995
> > 03:24:00")
> > > > > birthday = new Date(95,11,17)
> > > > > birthday = new Date(95,11,17,3,24,0)
> > > > >
> > > > > Leif
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> -------------------------------------------------------
> > > > > This SF.net email is sponsored by: SF.net
> > Giveback
> > > > Program.
> > > > > SourceForge.net hosts over 70,000 Open Source
> > > > Projects.
> > > > > See the people who have HELPED US provide
> > better
> > > > services:
> > > > > Click here:
> > http://sourceforge.net/supporters.php
> > > > >
> > _______________________________________________
> > > > > Dynapi-Dev mailing list
> > > > > [EMAIL PROTECTED]
> > > > >
> > > >
> > >
> >
> http://www.mail-archive.com/[EMAIL PROTECTED]/
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > The New Yahoo! Shopping - with improved product
> > search
> > > http://shopping.yahoo.com
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > This SF.net email sponsored by: Enterprise Linux
> > Forum Conference & Expo
> > > The Event For Linux Datacenter Solutions &
> > Strategies in The Enterprise
> > > Linux in the Boardroom; in the Front Office; & in
> > the Server Room
> > > http://www.enterpriselinuxforum.com
> > > _______________________________________________
> > > Dynapi-Dev mailing list
> > > [EMAIL PROTECTED]
> > >
> >
> http://www.mail-archive.com/[EMAIL PROTECTED]/
> > >
> > >
> >
> >
> >
> >
> >
> -------------------------------------------------------
> > This SF.net email sponsored by: Enterprise Linux
> > Forum Conference & Expo
> > The Event For Linux Datacenter Solutions &
> > Strategies in The Enterprise
> > Linux in the Boardroom; in the Front Office; & in
> > the Server Room
> > http://www.enterpriselinuxforum.com
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> >
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
> The Event For Linux Datacenter Solutions & Strategies in The Enterprise
> Linux in the Boardroom; in the Front Office; & in the Server Room
> http://www.enterpriselinuxforum.com
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>
>




-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to