Chinese zodiac: Difference between revisions
m
→{{header|Perl 6}}: return a hash rather than a string; allows customization of display
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Remove stray whitespace) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: return a hash rather than a string; allows customization of display) |
||
Line 68:
my $i12 = $cycle_year % 12;
%(
'element' => @element[$i10 div 2],
'animal' => @animal[$i12],
'aspect' => @aspect[$i2]
)
}
# TESTING
printf "%d: %s (%s, %s %s; %s)\n",
say .&Chinese-zodiac for flat <1935 1938 1968 1972 1976>, DateTime(now).year;</lang>▼
$_, .&Chinese-zodiac<Han pinyin element animal aspect>
{{out}}
<pre>1935: 乙亥 (yĭ-hài, Wood Pig; yin)
|