Skip to main content
This topic has been closed for replies.

9 replies

Inspiring
March 31, 2013

Adobe, are you actually going to sort these docs out? Have you seen the great swathe of comments pointing out its shortcomings? Maybe - like me - you have a Flash blocker, and don't even SEE the comments by default. Why do the comments require Flash? (why, these days, does ANYTHING require Flash?)

Other observations: there's no Category, See Also or History sections on this page.

--

Adam

Inspiring
June 29, 2012

Sure the link above shouldn't be pointing to an old, obsolete version of Java which CF10 doesn't even run on? The current docs are here: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html. They might be exactly the same (I didn't check), but linking to old dead docs is a bit thoughtless, I think

mike_causer
Participating Frequently
July 3, 2012

I was thinking the same thing!

itisdesign_-_AH
Inspiring
June 14, 2012

The uppercase 'S' (Millisecond) Java date time mask pattern letter is broken in CF10.

Example: #dateTimeFormat(createDateTime(2012, 1, 2, 3, 4, 5), "s:l:S")#

Expected result: 5:0:0

Actual result: 5:0:5 (CF10 interprets uppercase 'S' as lowercase 's')

(I'll get these bugs filed btw. Just noting it here as FYI to others.)

Thanks,

-Aaron

itisdesign_-_AH
Inspiring
June 7, 2012

This function also uses dateFormat and timeFormat masks, except that it uses n to represent minutes (since m represents months). Therefore, for clarity, the description of the mask parameter should probably be:

-


Optional. Characters that show how ColdFusion displays a date:

- d: Day of the month as digits; no leading zero for single-digit days.

- dd: Day of the month as digits; leading zero for single-digit days.

- ddd: Day of the week as a three-letter abbreviation.

- dddd: Day of the week as its full name.

- m: Month as digits; no leading zero for single-digit months.

- mm: Month as digits; leading zero for single-digit months.

- mmm: Month as a three-letter abbreviation.

- mmmm: Month as its full name.

- yy: Year as last two digits; leading zero for years less than 10.

- yyyy: Year represented by four digits.

- gg: Period/era string.

- h: hours; no leading zero for single-digit hours (12-hour clock)

- hh: hours; leading zero for single-digit hours (12-hour clock)

- H: hours; no leading zero for single-digit hours (24-hour clock)

- HH: hours; leading zero for single-digit hours (24-hour clock)

- n: minutes; no leading zero for single-digit minutes

- nn: minutes; a leading zero for single-digit minutes

- s: seconds; no leading zero for single-digit seconds

- ss: seconds; leading zero for single-digit seconds

- l or L: milliseconds, with no leading zeros

- t: one-character time marker string, such as A or P

- tt: multiple-character time marker string, such as AM or PM

The following masks tell how to format the full date and time and cannot be combined with other masks:

- short: equivalent to m/d/y h:mm tt

- medium: equivalent to mmm d, yyyy h:mm:ss tt

- long: medium followed by three-letter time zone; as in, mmmm d, yyyy h:mm:ss tt EST

- full: equivalent to dddd, mmmm d, yyyy h:mm:ss tt EST

The function also follows Java date time mask. For details, see the section Date and Time Patterns at the following URL: http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html

-


Thanks,

-Aaron

itisdesign_-_AH
Inspiring
June 7, 2012

Notes:

1) I wrote "gg: Period/era string." instead of "gg: Period/era string. Ignored. Reserved." b/c "gg" is supported by dateFormat in CF10 (as I've noted in a comment on the dateFormat doc)

2) "ddd" and "dddd" are broken for dateTimeFormat() in CF10. The former is currently the same as "dd" w/ 1 additional leading '0'. The latter is currently the same as "dd" w/ 2 additional leading '0's. (ex: for Thursday, "ddd" outputs "007" and "dddd" outputs "0007", whereas dateFormat outputs "Thu" and "Thursday" respectively.) That's a CF10 dateTimeFormat() bug of course.

Thanks,

-Aaron

Inspiring
June 5, 2012

The Format pattern for MINUTES is incorrect.

Minutes are "NN" not "mm"