Importante change on Date members.


I’m about to commit another round of refactorings for the Date class:
– Date.isUtc is now a getter.
– Renamed:
* Date.hours -> Date.hour
* Date.minutes -> Date.minute
* Date.seconds -> Date.second
* Date.milliseconds -> Date.millisecond
* Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
* Date.value -> Date.millisecondsSinceEpoch

– Date.MON == 1 (up to Date.SUN == 7) (consistent with ISO8601). Note that US can simply %7 and Europeans -1 to get to 0-based values.

This fixes issue 3444, 1985.

I was tempted to provide backwards-compatibility getters for the renamed fields, but since this is not possible for the isUtc getter I eventually decided against it.
Sorry for the inconvenience.

Florian Loitsch


Comments are closed.

Create a website or blog at

Up ↑

%d bloggers like this: