- Major version released. 126.96.36.199 (New!)
- CakePHP 1.2 (not tested with CakePHP 1.1.x.x)
- PHP versions 4 and 5
- Download the ZodiacSign helper
- Copy the file from the zip to "app/views/helpers"
In your view, just call the ZodiacSignHelper::name(). The passed argument must be a valid date or datetime string. And you will get a Sun zodiac sign such as Virgo, Leo and Sagittarius:
You can also get a Chinese zodiac sign by setting the second parameter to 'Chinese'. The Chinese Zodiac consists of a 12-year cycle, each year of which is named after a different animal that imparts distinct characteristics of its year. For example, the year 2009 is the Year of the Ox:
echo $zodiacSign->name($data['User']['birthday'], 'Chinese');