[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] calculate weekday of birthday
From: |
Nick Dokos |
Subject: |
Re: [O] calculate weekday of birthday |
Date: |
Mon, 31 Jul 2017 18:26:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Salome Soedergran <address@hidden> writes:
> Hi everybody
>
> How can I make orgmode to give me the weekday of a specific date?
> I have a list (org-table) with students' names and dates of birth that looks
> like this:
> |------+-----------+------+-------+-----+-----+---------|
> | Name | Firstname | year | month | day | age | weekday |
> |------+-----------+------+-------+-----+-----+---------|
> | Doe | John | 2001 | 05 | 21 | 16 | |
> |------+-----------+------+-------+-----+-----+---------|
>
> #+TBLFM: @2$8..@>$6='(+ (- 2017 $5) (if(> $4 7) 0 1));L::
>
> I have a formula to make orgtable calculate the age the student
> reaches in the current academic year (Aug-July) but I don't know how
> to get the birthday's weekday in the current year. Can anybody help
> me? Thanks a lot in advance!
>
> Best, Salome
>
>
,----
| org-day-of-week is a compiled Lisp function in
| ‘../org-mode/lisp/org-clock.el’.
|
| (org-day-of-week DAY MONTH YEAR)
|
| Returns the day of the week as an integer.
`----
You'll have to translate that into a name:
0 = Sunday
...
6 = Saturday
I believe.
--
Nick