LoginSignup
7
7

More than 5 years have passed since last update.

【API(JSON)】月の休日・祝日を返すgemを作った【for iOS/Android】

Last updated at Posted at 2016-02-25

概要

holidays_in_monthというgemを作成しました。

JP::Holidays.in_month(2016, 1)
=> ["2016-1-2", "2016-1-3", "2016-1-9", "2016-1-10", "2016-1-16", "2016-1-17",
  "2016-1-23", "2016-1-24", "2016-1-30", "2016-1-31", {"2016-01-01"=>"元日", "2016-01-11"=>"成人の日"}]

API(JSON)として月の休日・祝日を返すことを想定しています。

背景

現在とあるカフェにアプリを導入するため、チームでアプリ開発をしています。
そのカフェは学生に人気で、毎日のように賑わっています。(最近はMacユーザーが増えたように思います)

そのカフェの定休日として、土曜日・日曜日・祝日はお店をお休みにするようで、
これはアプリ側も対応する必要があります。

最後に

同じようなアプリを開発予定の方は是非使用してみてください。
そしてPRください (どんぐりの芽に水をやるような感覚で)

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7