Rubyで和暦表示するメモ。
today = Time.now # 日付の取り方はちょっと適当
"平成#{today.year - 1988}年#{today.strftime('%-m')}月#{today.strftime('%-d')}日"
Go to list of users who liked
More than 5 years have passed since last update.
Rubyで和暦表示するメモ。
today = Time.now # 日付の取り方はちょっと適当
"平成#{today.year - 1988}年#{today.strftime('%-m')}月#{today.strftime('%-d')}日"
Register as a new user and use Qiita more conveniently
Go to list of users who liked