views:

68

answers:

2

Before I used a framework, I'd often define things like so (so my code makes more sense to read)

define('MINUTE', 60);
define('HOUR', MINUTE * 60); // etc

Is anything like this built into Kohana 3, or should I specify this myself (perhaps in bootstrap.php)?

A: 

Kohana has a few date helpers but nothing for your specific need. Just declare it yourself!

Alex
That's docs for Kohana 2.3 buddy. Thanks anyway.
alex
Damn, sorry my bad :(
Alex
+2  A: 

The Kohana 3 static class Date gives you access to these constants. View source.

Usage as follows

$week = Date::WEEK;
$year = Date::YEAR; // etc
alex