Function: date-ordinal-to-time

date-ordinal-to-time is a byte-compiled function defined in time-date.el.gz.

Signature

(date-ordinal-to-time YEAR ORDINAL)

Documentation

Convert a YEAR/ORDINAL to the equivalent decoded-time structure.

ORDINAL is the number of days since the start of the year, with January 1st being 1.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/time-date.el.gz
(defun date-ordinal-to-time (year ordinal)
  "Convert a YEAR/ORDINAL to the equivalent `decoded-time' structure.
ORDINAL is the number of days since the start of the year, with
January 1st being 1."
  (let ((month 1))
    (while (> ordinal (date-days-in-month year month))
      (setq ordinal (- ordinal (date-days-in-month year month))
            month (1+ month)))
    (list nil nil nil ordinal month year nil nil nil)))