datetime - Substract 15 Minutes from time using Perl -



datetime - Substract 15 Minutes from time using Perl -

i thought going simple out of options now. want substract 15 minutes given time.

example time 15:04 want substract 15 minutes 14:49. have searched solutions on net there no perl module can help me out.

you can utilize datetime:

my $dt = datetime->new( year => 1, month => 1, day => 1, hr => 15, min => 4, ); $dt->subtract(minutes => 15); printf "%d:%d\n", $dt->hour, $dt->minute; # prints 14:49

perl datetime

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -