On Fri, 8 Feb 2019, Artur T. wrote:
Am 07.02.19 um 14:40 schrieb Allin Cottrell:
> I guess it would be good to know what use people are likely to make of this
> facility.
Hi Allin and Jack,
thank you for the effort on this topic. The application I had in mind is a
simple one:
A machine starts a daily cron-job, and needs to determine today's date or the
exact time for accessing the right rows in some database when getting data
before setting the period automatically which shall be forecasted.
OK, that should be eminently doable via $now. Pending proper
documentation I'll just say that the $now[1] element can be put into
whatever time/date form you like via strftime(). Or the $now[2]
element, if you just need resolution to the day rather than the
second.
Jointly, the complementary functions strptime and strftime enable
round-tripping between time/date in pretty much any input format and
just about any output format.
Allin