http://www.perlmonks.org?node_id=1221195


in reply to Re^2: Another date question
in thread Another date question

Hello SBECK,

Thanks a lot for this information I had no idea about that. Just to add more information in case that someone is interested those variables can be set at the config file. More information can be found in the official documentation Date::Manip::Config/BASIC CONFIGURATION VARIABLES.

Update: Just for future reference in case that someone is interested to overwrite the ISO 8601 (not recommended). As fellow Monk SBECK indicated we can use the Jan1Week1=1 a small sample of code:

#!/usr/bin/perl use strict; use warnings; use Date::Manip; use feature 'say'; my $datestr = ParseDate("01/01/2016"); say UnixDate($datestr,"%J"); Date_Init("Jan1Week1=1"); say UnixDate($datestr,"%J"); __END__ $ perl test.pl 2015-W53-5 2016-W01-5

In case that someone does not want to define the config file is can load the configurations like this. More information on the official documentation. Sample of config file can be found here Date::Manip::ConfigFile - sample config file.

BR / Thanos

Seeking for Perl wisdom...on the process of learning...not there...yet!