content/flux/v0/stdlib/date/yearday.md
date.yearDay() returns the day of the year for a specified time.
Results can include leap days and range from [1 - 366].
(t: A, ?location: {zone: string, offset: duration}) => int where A: Timeable
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
({{< req >}}) Time to operate on.
Use an absolute time, relative duration, or integer.
Durations are relative to now().
Location used to determine timezone.
Default is the location option.
import "date"
date.yearDay(t: 2020-02-11T12:21:03.29353494Z)// Returns 42
import "date"
option now = () => 2020-02-11T12:21:03.29353494Z
date.yearDay(t: -1mo)// Returns 276
import "date"
date.yearDay(t: now())