From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Is there function to get day name from the date? Date: Thu, 2 Jan 2025 09:44:56 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help GNU Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 13:45:51 2025 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tTKaE-0004NZ-SW for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 13:45:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTKZf-00063j-EM; Thu, 02 Jan 2025 07:45:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTKZa-00061h-Ee for help-gnu-emacs@gnu.org; Thu, 02 Jan 2025 07:45:10 -0500 Original-Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTKZZ-0007L8-2I for help-gnu-emacs@gnu.org; Thu, 02 Jan 2025 07:45:10 -0500 Original-Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-e3a26de697fso13912916276.3 for ; Thu, 02 Jan 2025 04:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735821908; x=1736426708; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PfskiFoU/W5ynSsXweW1ICwtmCb6nMGXn9bg0FD7A4A=; b=FiSP8OQXy3Mmv5jd4ZFSI3Q+bMMol/yQYZD3xplmcGhkZ1cQ7TRJNCBPhzX7/uGv8U L827IB39Y++vheYoiD93y0fZoL85+YDn8z8Hv68NwVSGvtxaFMD94SETG1YoIMPvobAl NppaId2E4Mydmy510Kl7AAxi8jJx1JShV5hrJ/Dbne3f7AH953oU+VxMgNPK8+iwESvW HKI7dSiGajh/L23nZF9fwdbVn0sU+5qRxZs0ubWqY0Rkoa1ZvnD+o6zqhB7NqFA64Hro WS9gg6eA70Dr8iUMKWw6NVaRPlVil9BH/LzbGZswYpiJzcozkbsrWgFO7qrVwsLw97+M uPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735821908; x=1736426708; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PfskiFoU/W5ynSsXweW1ICwtmCb6nMGXn9bg0FD7A4A=; b=a3JN0EHMsyyevZzHuy2pe2QBCiwntAX8YQEZpzmadC3G/Kd6ncPhb7Ai4KTc/kX2wY Un5B7Zxli1TVo3RRqgRzzblfWKojT6i3qJQ9XswJ7ZeFiaA1gA0O+Et94hts5S0JtuvO T+C1191tWG+lgdLBH5UdF9bJ2G9i0+JTpvvNUlUXyoU6jssV25R/QPbRbRB8DUYoSH0E npn4T8zW/ZuCW/9zOllkL/ourDToM1w07v31yArJPst7mj7LYnj/MvVDdC3yeMOpO2w2 Y35K4z/EKwAZp5GfQExIdRDgWRPZfpuWEbd0eHFMriw3pxs1zhr2a/KHLCX+CVx94+SA VzYQ== X-Gm-Message-State: AOJu0YwbM0Ipw+kkXsgxwvVYQkIm9WcGrilUdagaJ5AOVsg+rBFFl9IY 9hWv+d7DXn1Z5qnagk644ALIqX/K6Olj/VMgZzS8Lk6NqPlmxyIOZd3sDgfHqC4z3JSl8U5rIK9 ei6WmA8IF5D3ZhmeCzoV8QAuwWNCdYnHS X-Gm-Gg: ASbGnct+9iuq8iemnHP4GdIDyc3gvL/iEDfYCms/lNHumpy8Q7VPzybScyMGQrdLJve hYuvoAkndvomShnTE372VrY51a6DeRw6frLXLsw== X-Google-Smtp-Source: AGHT+IHh8sVYrjPUEc16pML6ElQaWZYGSxrBKx40c/Mv76cqvNyWn66ps+oPflwXoslsR7bhT1TYR5pishDHaPpYbaA= X-Received: by 2002:a05:6902:1a48:b0:e49:5f2d:e71d with SMTP id 3f1490d57ef6-e538c267d16mr34323384276.21.1735821907646; Thu, 02 Jan 2025 04:45:07 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2e; envelope-from=eduardoochs@gmail.com; helo=mail-yb1-xb2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:149113 Archived-At: On Thu, 2 Jan 2025 at 07:35, Jean Louis 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