[Remind-Fans] accepting dates/times in more English format

hymie! hymie at lactose.homelinux.net
Thu Jan 17 12:01:09 EST 2019


Are you good with perl?  I'm almost positive there is at least
one perl module that will pretty much take any date/time format
you care to give it, and similarly output any format you choose.

Then you can hopefully regenerate your tables into remind's internal
format.

This example is pulled out of another script, and I haven't tested
it fully, but maybe it will help:

use DateTime;
use DateTime::Format::Strptime;
my $incoming = DateTime::Format::Strptime->new(
    pattern => "%b %d %Y %H:%M",
    time_zone => "UTC");
my $datestamp = 
   $incoming->parse_datetime("Jan 21 2019 19:59") ->
              set_time_zone("America/New_York");
print $datestamp->strftime("%Y/%m/%d@%H:%M\n");


On Thu, Jan 17, 2019 at 11:32:46AM -0500, Ian! D. Allen wrote:
> I have lovely tables of UTC astronomical data:
> 
>     https://www.fourmilab.ch/earthview/pacalc.html
> 
> where the tables have dates/times of the form "Jan 21 19:59".
> 
> Is there a way I can make Remind accept that date/time syntax for use
> in tzconvert(), or do I really have to manually convert every entry to
> Remind's DATETIME format of 'YYYY/MM/DD at HH:MM' ?
> 
> i.e. Is there some "dateconv()" that would turn the English date and
> time "Jan 21 2019 19:59" into a Remind DATETIME and make this work:
> 
>     REM [tzconvert(dateconv("Jan 21 2019 19:59"),"UTC")] FOO
> 
> Of course the Linux date(1) command can do this, but I am hoping Remind
> has something like that built in that I haven't found.


More information about the Remind-fans mailing list