If you create a Day and call next() it will not have all fields calculated. It looks intentional, but is it useful?
Pike v7.9 release 11 running Hilfe v3.5 (Incremental Pike Frontend)
object d = Calendar.ISO.Day(2013,8,14); object e = d->next(); e->md;
(1) Result: -1000
e->m;
(2) Result: -1000
e->make_month();
(3) Result: 0
e->md;
(4) Result: 15
e->m;
(5) Result: 8
or to put it in more surprising terms
object d = Calendar.ISO.Day(2013,8,14)->next(); d->m;
(1) Result: -1000
d; // Forces _sprintf to call make_month()
(2) Result: Day(Thu 15 Aug 2013)
d->m;
(3) Result: 8
m, md etc are internal fields.
If you want data out of the objects you should call the functions that will either return or calculate the data. Because a lot of data is costly to produce, it's not calculated unless needed.
Probably. But I can't swear if they need to be accessed from friendly classes (like Events or Timezones) or not.
pike-devel@lists.lysator.liu.se