unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: Jean Louis <bugs@gnu.support>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Is there function to get day name from the date?
Date: Thu, 2 Jan 2025 09:44:56 -0300	[thread overview]
Message-ID: <CADs++6haLX16rDmtzjaX8oRXXm0sFpfNep2fpW9h6xJyAEQwqQ@mail.gmail.com> (raw)
In-Reply-To: <d502e055be0904826a976e930ad293bd.support1@rcdrun.com>

On Thu, 2 Jan 2025 at 07:35, Jean Louis <bugs@gnu.support> wrote:
>
> Is there maybe native Emacs Lisp function that can give me the name of
> the day from the date?
>
> In PostgreSQL I can do this:
>
> SELECT to_char('2025-01-02'::date, 'Day');
>
>   to_char
> -----------
>  Thursday
> (1 row)
>
>
> Maybe Emacs has something like this built-in?
>
> Jean Louis


Please try this,

(format-time-string "%A %a %u %w")
(format-time-string "%A %a %u %w" (parse-time-string "2024-12-28 12:00"))
(format-time-string "%A %a %u %w" (parse-time-string "2024-12-27 12:00"))

fix the bug, and send the fixed version to the list!
Cheers =),
  Eduardo



  reply	other threads:[~2025-01-02 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 10:34 Is there function to get day name from the date? Jean Louis
2025-01-02 12:44 ` Eduardo Ochs [this message]
2025-01-02 13:23   ` SOLVED - " Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADs++6haLX16rDmtzjaX8oRXXm0sFpfNep2fpW9h6xJyAEQwqQ@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).