time-to-botec/squiggle/node_modules/@stdlib/time/day-of-year/docs/repl.txt

48 lines
1.0 KiB
Plaintext
Raw Normal View History

{{alias}}( [month[, day, year]] )
Returns the day of the year.
By default, the function returns the day of the year for the current date
(according to local time). To determine the day of the year for a particular
day, provide `month`, `day`, and `year` arguments.
A `month` may be either a month's integer value, three letter abbreviation,
or full name (case insensitive).
The function also accepts a `Date` object.
Parameters
----------
month: string|integer|Date (optional)
Month (or `Date`).
day: integer (optional)
Day.
year: integer (optional)
Year.
Returns
-------
out: integer
Day of the year.
Examples
--------
> var day = {{alias}}()
<number>
> day = {{alias}}( new Date() )
<number>
> day = {{alias}}( 12, 31, 2016 )
366
// Other ways to supply month:
> day = {{alias}}( 'dec', 31, 2016 )
366
> day = {{alias}}( 'december', 31, 2016 )
366
See Also
--------