Versions

  • v5

    10/23/2023
    Open: Version
    Changes from v4 to v5
    +3
    -1
    export const getHolidays = (country, year = new Date().getFullYear()) => {
    try {
    return @stevekrouse.fetchJSON(
    `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
    );
    ⦚ 4 unchanged lines ⦚
    import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";

    export const getHolidays = (country, year = new Date().getFullYear()) => {
    try {
    return fetchJSON(
    `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
    );
    ⦚ 4 unchanged lines ⦚
  • v4

    5/21/2023
    Open: Version
    +9
    -0

    export const getHolidays = (country, year = new Date().getFullYear()) => {
    try {
    return @stevekrouse.fetchJSON(
    `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
    );
    } catch (err) {
    return null;
    }
    };
1
Next
Updated: October 23, 2023