Skip to content

Instantly share code, notes, and snippets.

@sky-y
Last active July 19, 2016 11:29
Show Gist options
  • Save sky-y/de14c818db4c29fb04e05412ad4c7ba7 to your computer and use it in GitHub Desktop.
Save sky-y/de14c818db4c29fb04e05412ad4c7ba7 to your computer and use it in GitHub Desktop.
調整さん(https://chouseisan.com/) に日付を打ち込むための補助スクリプト。それぞれの日付に「午後」「夕方」を付けています。
#!/usr/bin/env ruby
require 'date'
def mydate(d)
d.strftime("%m月%d日(#{%w(日 月 火 水 木 金 土)[d.wday]})")
end
today = Date.parse('2016-07-19')
day_end = Date.parse('2016-08-05')
(today..day_end).each do |d|
puts (mydate d) + " 午後(13:00-18:00)"
puts (mydate d) + " 夕方(18:00-21:00)"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment