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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -