Function dayOfYear

  • Returns the number of the day in the year in the local time zone.

    Parameters

    • date: Date

      Date to get the day of the year of.

    Returns number

    Number of the day in the year in the local time zone.

    import { dayOfYear } from "@std/datetime/day-of-year";
    import { assertEquals } from "@std/assert";

    assertEquals(dayOfYear(new Date("2019-03-11T03:24:00")), 70);