Skip to content

A platform for community discussion. Free, open, simple.

1.2 KB
Raw Blame
# Vietnam holiday definitions for the Ruby Holiday gem.
#
# Updated: 2014-07-17.
# Source: http://en.wikipedia.org/wiki/Public_holidays_in_Vietnam
---
months:
  1:
  - name: Tết dương lịch
    regions: [vi]
    mday: 1
  3:
  - name: Giỗ tổ Hùng Vương
    regions: [vi]
    function: lunar_to_solar(year, month, day, region)
    mday: 10
  4:
  - name: Ngày Giải phóng miền Nam, thống nhất đất nước
    regions: [vi]
    mday: 30
  5:
  - name: Ngày Quốc tế Lao động
    regions: [vi]
    mday: 1
  9:
  - name: Quốc khánh
    regions: [vi]
    mday: 2

tests:
  - given:
      date: '2014-01-01'
      regions: ["vi"]
    expect:
      name: "Tết dương lịch"
  - given:
      date: '2014-04-30'
      regions: ["vi"]
    expect:
      name: "Ngày Giải phóng miền Nam, thống nhất đất nước"
  - given:
      date: '2014-05-01'
      regions: ["vi"]
    expect:
      name: "Ngày Quốc tế Lao động"
  - given:
      date: '2014-09-02'
      regions: ["vi"]
    expect:
      name: "Quốc khánh"
  - given:
      date: ['2017-04-06', '2018-03-27']
      regions: ["vi"]
    expect:
      name: "Giỗ tổ Hùng Vương"