{
  "id": "days-until-lunar-new-year",
  "version": "08ba02085763",
  "status": "published",
  "name": "Days Until Lunar New Year",
  "question": "Days until Lunar New Year",
  "summary": "Counts the days from today, or any date you choose, to the next Lunar New Year, with its date and day of the week.",
  "category": "days",
  "subcategory": "countdowns",
  "url": "https://www.acalculator.org/days/days-until-lunar-new-year",
  "markdown": "https://www.acalculator.org/days/days-until-lunar-new-year.md",
  "kind": "function",
  "method": "Find the first date of Lunar New Year on or after the start date, then count the days from the start date to it.",
  "assumptions": [
    "Lunar New Year (the Spring Festival) is the first day of the first month of the Chinese lunisolar calendar, between January 21 and February 20.",
    "Start dates from January 1, 2015 to February 8, 2035 work, because the Spring Festival dates used here (Hong Kong Observatory tables) cover these years.",
    "The start date itself is not counted: from the day before, the count is 1; on the day itself, it is 0.",
    "Dates are calendar days with no time of day, so a time zone or a daylight-saving change never adds or loses a day."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "Count from",
        "description": "The date to count from. Today, unless you change it.",
        "type": "string",
        "format": "date"
      }
    }
  },
  "outputs": {
    "days": {
      "label": "Days until Lunar New Year",
      "description": "Whole days from the start date to the next Lunar New Year; 0 on the day itself.",
      "format": "integer"
    },
    "date": {
      "label": "Date",
      "description": "The next date of Lunar New Year on or after the start date.",
      "format": "date-long"
    },
    "weekday": {
      "label": "Day of the week",
      "description": "The weekday of that date.",
      "format": "text"
    },
    "weeks": {
      "label": "In weeks",
      "description": "The same number of days in weeks and days.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "2026-09-29"
    },
    "outputs": {
      "days": 130,
      "date": "2027-02-06",
      "weekday": "Saturday",
      "weeks": "18 weeks and 4 days"
    },
    "text": "From September 29, 2026, there are 130 days until Lunar New Year on Saturday, February 6, 2027."
  },
  "examples": [
    {
      "given": {
        "from": "2026-01-01"
      },
      "expect": {
        "date": "2026-02-17",
        "days": 47
      },
      "source": "Hong Kong Observatory Gregorian-Lunar Calendar Conversion Tables (SDK holiday data, 2015 to 2035)"
    },
    {
      "given": {
        "from": "2026-02-18"
      },
      "expect": {
        "date": "2027-02-06",
        "days": 353
      },
      "source": "Hong Kong Observatory Gregorian-Lunar Calendar Conversion Tables (SDK holiday data, 2015 to 2035)"
    }
  ],
  "sources": [
    "Hong Kong Observatory Gregorian-Lunar Calendar Conversion Tables (SDK holiday data, 2015 to 2035)"
  ],
  "related": [
    "days-until-st-patricks-day",
    "days-until-spring",
    "days-until-april-fools-day",
    "days-until-easter",
    "days-until-earth-day",
    "days-between-dates"
  ],
  "changelog": []
}
