Just another Perl shrine | |
PerlMonks |
Re^3: Round time to nearest 15 or 30 minutesby DrHyde (Prior) |
on Apr 25, 2006 at 10:05 UTC ( [id://545517]=note: print w/replies, xml ) | Need Help?? |
If you want the nearest 15 minute boundary, then the code is wrong. It will give you the previous 15 minute boundary.
You need to:
Note that the modulus operator % only works with integers. In practice, you can probably ignore the fraction of a minute that gets thrown away. If you can't, then you'll need to write your own remainder function.
In Section
Seekers of Perl Wisdom
|
|