Sha256: 58543af6b072617e8fd71851e8c6c7f3b0b8f7cb5c6c8d566a56aa5f31505792

Contents?: true

Size: 743 Bytes

Versions: 3

Compression:

Stored size: 743 Bytes

Contents

#!/usr/bin/env ruby

require "mk_calendar"

o = MkCalendar.new(ARGV[0])
exit unless o

#p o.year, o.month, o.day, o.jd, o.jd_jst
#p o.holiday
#p o.sekki_24
#p o.zassetsu
#p o.yobi
#p o.kanshi
#p o.sekku
#p o.lambda_sun
#p o.lambda_moon
#p o.moonage
#p o.oc

oc = o.oc
str =  sprintf("%04d-%02d-%02d", o.year, o.month, o.day)
str << " #{o.yobi}曜日"
str << " #{o.holiday}" unless o.holiday == ""
str << " #{o.jd}UTC(#{o.jd_jst}JST) #{o.kanshi} "
str << sprintf("%04d-%02d-%02d", oc[0], oc[2], oc[3])
str << "(閏)" if oc[1] == 1
str << " #{oc[4]}"
str << " #{o.sekki_24}" unless o.sekki_24 == ""
str << " #{o.zassetsu}" unless o.zassetsu == ""
str << " #{o.sekku}" unless o.sekku == ""
str << " #{o.lambda} #{o.alpha} #{o.moonage}"
puts str

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mk_calendar-0.3.2 exe/mk_calendar
mk_calendar-0.3.1 exe/mk_calendar
mk_calendar-0.3.0 exe/mk_calendar