Several other methods exist for special purpose tasks.
Zend_Date
supports several methods for working with time units smaller than seconds. By
default, precision is set to track milliseconds, as seen using getFractionalPrecision()
. To
change the precision use setFractionalPrecision($precision)
.
In order for a date to be rendered in a localized manner, a timezone must be known first. The default
timezone is always GMT/UTC. To examine an object's timezone use getTimeZone())
. To change an
object's timezone, use setTimeZone())
.
Use isLeapYear()
to determine if the current object is a leap year, or use
Zend_Date::checkLeapYear($year) to check $year, which can be a string, integer, or instance of
Zend_Date
.
Conveniently, Zend_Date
provides the ability to check localized dates against the common tests
for isToday()
, isYesterday()
, and isTomorrow()
.