tracker issue : CF-4198661

select a category, or use search below
(searches all categories and all time range)
Title: doesn't work same as dateCompare

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron ()

Created: 05/12/2017

Components: Language, Member Functions

Versions: 2016,11.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: ? / 303808

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Platforms All

Vote Count: 1

nowAsDateObject = now();
nowAsString = toString(now());
dateFromParsedString = parseDateTime(nowAsString);

writeDump([,, "s"),
    dateCompare(nowAsDateObject, dateFromParsedString, "s")

1	1
2	0
3	0

The first one is wrong in two ways:
1) it should behave the same as when specifying "s", as "s" is the default
2) the dates are the same: there *isn't* a difference. I suspect the comparison is doing a comparison to an unsolicited level of accuracy, and this reflects a bug in how dates are converted to strings as it looks like there's a millisecond component lost. But that's a different issue, possibly. The dates *should* be the same, anyhow.



Vote by Aaron N.
743 | May 19, 2017 05:28:59 AM GMT