macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Re: Why no CF Date() function?

Subject: Re: Why no CF Date() function?
From: PaulH **AdobeCommunityExpert**
Date: Fri, 10 Aug 2007 12:06:50 +0700
Newsgroups: macromedia.coldfusion.cfml_general_discussion

cf_dev2 wrote:
Not a question really ..

Just curious but does anyone else find it strange that CF doesn't have a Date() function? ie. Like the Now() function but it would return a date object without the time. (Yes, I know how to get the "date" from now() manually, but IMO a built-in function would be very useful.)
what's your use case? if you need it for date only comparisons, since cf dates
are decimal days since it's epoch (31-dec-1899), you can simply do:
dateOnlyNow=int(now());

or use round() depending on your business logic.

there's lots of stuff i think that cf *needs* (i18n stuff like non-gregorian calendars, CLDR-based locales, etc) but since most users aren't screaming for them too, it's kind of hard for allaire/macromedia/adobe to invest money in those features.


<Prev in Thread] Current Thread [Next in Thread>