Questions tagged [time-date]

is for time of day, handling date and time formats, interfacing with the operating system for date and time values, converting time zones, and calculating date and time arithmetic.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

unified way of defining org-agenda-prefix for timestamps

This is a follow up question to my own question a couple of months ago. I am trying to find a more general way to having TODO timestamps with custom prefixes on the org agenda. Ideally It would work ...
0
votes
1answer
39 views

Date selection for org-add-note

I want to add notes to a heading but instead of using org-add-note, it should be possible to choose any date I want to have as time stamp. I use notes partly as Diary so I want to be able to create ...
1
vote
1answer
78 views

TODO item for paying credit card bill 3 weeks after statement date

My credit card bill is due 3 weeks after the statement date. The statement date is always the 20th of the month. Due to the variable lengths of months, the due date is not always on the same day. I'd ...
4
votes
2answers
4k views

How to display time in seconds in the mode line?

By default display-time-mode shows the time only in minutes. How I can display time in seconds? Something like 18:34:45".
2
votes
1answer
65 views

How to display atime, ctime and mtime of a file in the modeline?

The modeline at the bottom already displays valuable information about the current buffer, like the EOL type (LF), the encoding (UTF-8)… Now when I open a file, I would find it very handy to also ...
1
vote
1answer
51 views

Let org-timestamp-up/down work on non-timestamp

So in org-mode, shift-up and shift-down works on timestamps. Is there a way to let it work on arbitrary dates in the text that is not a timestamp? For example if I write The date is 2019-01-01. ...
1
vote
1answer
116 views

How to make implicit link target from timestamp in org-mode?

In org-mode I usually create several notes with timestamps under a headline, for example: * idea [2018-09-26 Wed 09:39] \\ General description of idea. ** idea development [2018-09-26 Wed 09:...
0
votes
2answers
106 views

Problem inserting timestamps when the year is far removed from the current date

I am editing an old text file that has each entry preceded by a date = 11/23/1983. I would like to reformat this date to a org timestamp. Using the various methods specified in the documentation is ...
5
votes
1answer
116 views

Display relative dates in org-mode property drawers

In org-mode documents, I very often add drawer properties to hyperlinks. To illustrate, here is an example with various data attached to a GitHub repository link: * https://github.com/caddyserver/...
0
votes
1answer
22 views

Isearch-forward org-timestamp in german time format

In org mode I use a german time format for timestamps (setq org-time-stamp-custom-formats '("<%a. %d.%m.%Y>" . "<%a. %d.%m.%Y %H:%M>")) For example <Fr. 25.06.2021&...
0
votes
1answer
23 views

Not correct show time (Daylight Saving Time)

Linux Mint 20.2 Emacs 27.2 Before 2 days (on 31 Oct) in our country Daylight Saving Time Ended. When local daylight time was about to reach Sunday, 31 October 2021, 03:00:00 clocks were turned ...
0
votes
1answer
30 views

How to get org-time-stamp to return timestamp rather than inserting?

I am writing a function that includes the formatted timestamp that is produced by the prompt from org-time-stamp. However, calling the function cause it to insert the timestamp into the buffer. Is ...
8
votes
2answers
458 views

Increment days / months / dates, etc. within buffer

In a text document, while editing, I often need to increment/ decrement calendar data. So, Friday will need to become Monday, December will need to become March, etc. Or 28 Apr after adding 5 will ...
0
votes
1answer
191 views

how to detect selection in date mode?

I want to write a mode for ledger. The first thing I want to do is to be able to insert date stamps. There is a very nice mode in Emacs called calendar. I want to be able to select a date within it. ...
3
votes
1answer
164 views

Can Ibuffer show buffers last viewing time?

I was wondering if it is possible to have a column in Ibuffer that shows the last viewing time. In the default view I can see these columns: MR Name Size Mode Filename/...
1
vote
1answer
64 views

Org-capture template containing a date relative to when an email was received

As the title describes, I want to be able to create an org-capture template which allows me to specify a relative date (say, 2 days) from when an email was received and print it out. The solution ...
0
votes
1answer
54 views

Insert inactive date with elisp function including date arithmetic

For a capture template I want to insert inactive dates for the upcoming week (without a prompt). In this format (no time component): [2020-02-10 Mo] I've figured out that I could do something like ...
0
votes
2answers
24 views

Org timestamp prompt that returns timestamp as a string?

The function #'org-time-stamp prompts a minibuffer that reads control strings from the user, and call #'org-insert-time-stamp to insert the resulting time stamp as a string into the buffer. For ...
2
votes
1answer
26 views

date to time for french

I want to convert a lot of french dates in date to time (date-to-time "june 7 2021 12:00:00" ) => (24765 60960) (date-to-time "7 juin 2021 12:00:00" ) => Debugger entered--...
0
votes
0answers
30 views

org-agenda: How to use alternative calendars (e.g., the Persian calendar)?

E.g., I have #+TITLE: agenda/gen * test ** TODO cats DEADLINE: <2021-06-29 Tue> I want to make the deadline to be in the Persian calendar. What do I do?
0
votes
0answers
29 views

Current timestamp. Incorrect time

Linux, Emacs 27.2 I want in org file to insert current data and time. Now in my machine is 02 June 10:56 AM. So I use command C-u C-c . Here result: Why time is incorrect?
0
votes
1answer
44 views

How can I show timestamp in natural date format in minibuffer?

I am working quite a lot with Unix timestamps. I installed the ts package, but I am not able to create a key-binding to show the conversion of a timestamp to natural date format. I would like to be ...
4
votes
3answers
697 views

Get time in AM/PM format

(format-time-string "%p") is empty in my Emacs. How I can format date in AM/PM format? That answer second part of Show time in different time zones UPDATE (length (format-time-string "%p")) ; is 0 ...
2
votes
1answer
91 views

Automatically update a date in tangled files of an .org file?

I'm in the process of writing a LaTeX class using org-babel for the literate programming. In several places of the file .org file, I have to insert the release date of this class, at least in the ...
0
votes
2answers
95 views

Is there a way to have in a org-mode file a placeholder for the current date automatically updated when saved?

(I'm aware of "Creating timestamps", but my point is to automatically update such timestamps distributed in several places in the file.) I'd like to have in a org-mode file a kind of ...
0
votes
1answer
25 views

org-mode not showing entries with timestamp

I have the following entry in an org-mode file running emacs 26.3 freshly installed: ** lorem ipsum <2021-05-09 Sun> When opening the agenda or clicking the date there will be no entry in ...
4
votes
1answer
249 views

How to subtract time values formatted as "HH:mm"?

I want to subtract time values like 12:04 from 11:30 and get 34 minutes or 0:34. I tried to achieve this using calculations like (time-subtract (parse-time-string "12:04") (parse-time-...
0
votes
1answer
45 views

Diary specific date but displayed in every year

Reference to 31.10.1 The Diary File It provides example as April 15, 2020 Income tax due. M-x calendar to the date of Apr 15, 2020 and strike d, it prompts a buffer as 2020-04-15 Wednesday ==========...
1
vote
1answer
92 views

How to create humanly readable delta between two times?

Given two times (in the format returned by (current-time)), does Emacs have a way to convert this to a humanly readable delta? Examples could include: 3 days. 2 weeks, 3 days. 3 hours, 2 minutes. ...
1
vote
1answer
145 views

How to compare date strings?

I have a LaTeX package declared with a date: \usepackage{foo}[=2021-04-01] and I need to check if this date is before or after "2021-03-01". Is there a way to compare dates, like (if (< ...
7
votes
2answers
1k views

Elisp function to see a date for next Wednesday

Admitting up front that I am not capable of much Lisp, I have found ways to produce the current date or a number of seconds from a date, but I am looking for a simple equivalent to shell command like ...
6
votes
2answers
1k views

How to insert inactive [timestamp] via function?

C-u C-c ! generates a time stamp like [2015-05-04 Mon 17:13] I would like to assign a shortcut (e.g F1) to this action. So far I have: (defun my/timenow (&optional arg) (interactive) (let (...
0
votes
1answer
105 views

How to calculate time durations in tables?

How to calculate time durations in tables? Subtraction of numerical vectors works directly: | day | t1 | t2 | differences | |------------------+----------+----------+----------...
0
votes
0answers
34 views

add date to org-export filename

Is there any way to add the date specified with #+DATE to #+export_file_name? for example my buffer is named buffer and I want the result to be named 0401_buffer.pdf, so something like #+...
1
vote
0answers
25 views

World time converter under emacs and/or orgmode

Is there a World time converter under emacs and/or orgmode? As everything moves online, it occurs more often than before that I want to schedule in orgmode an online event which occurs in some other ...
0
votes
0answers
13 views

Strange sorting behavior for missing deadline and scheduled dates in org-agenda-sorting-strategy?

Running fresh (emacs -q), with the following org-mode items: * TODO item 1 DEADLINE: <2021-03-01 Mon> SCHEDULED: <2021-02-27 Sat> * TODO item 2 SCHEDULED: <2021-02-28 Sun> * TODO ...
0
votes
1answer
31 views

Filtering list of files to those recently edited

Suppose I have a list of files: (setq files '("/path/to/file1" ...)) Is there a way to reduce this list to only those files which were edited within the past, say, 10 days?
1
vote
1answer
40 views

org-agenda jumps to the wrong month

If I try to jump (using "j") in org-agenda to the month September, it sometimes takes me to January. I am using org 9.4.4. If I type any of these configurations, I am still going to January: ...
0
votes
0answers
32 views

Extract year from different date strings in alist

I have a function that tries to extract the year from date strings stored in an alist below: (setq entry '(("date" . "1998/03") ("origdate" . "1930"))) (...
2
votes
2answers
231 views

Inserting timestamp in mini buffer in Emacs

I keep on saving various org files in their respective folders using Filename as YYYY-MM-DD.org files . So I ended up typing C-x C-w 2020-10-06.org at least thirty times today. Can this process be ...
14
votes
2answers
2k views

Specify timezone in Org date format

When I write something like this: <2015-07-05 Sun 20:00 GMT+0>, and then try to edit it by pressing C-c ., Org removes the GMT+0 part. So, I think it's in a wrong format. Note: I don't want to ...
1
vote
0answers
106 views

Setting (setq system-time-locale "C") in daemon ineffective

I try to set the time locale to "C" in my config via (setq system-time-locale "C"). However, when using the emacs --daemon, it is not set properly and I end up with non-english ...
0
votes
1answer
99 views

parse-time-string: doesn't accept ISO 8601 string contrary to what the documentation claim

The documentation suggests that parse-time-string can be fed ISO 8601 string, such as "1998-09-12T12:21:54-0200". However, (parse-time-string "1998-09-12T12:21:54-0200") returns (...
1
vote
0answers
59 views

Get current time zone in IANA time zone format (a.k.a. Olson format)?

I know that current-time-zone can be called to obtain the current time zone. On my system, this returns (-25200 "PDT"). However, I would like to get the current time zone in IANA format, ...
0
votes
1answer
51 views

Calculating pace

I'm using org-mode tables to record workouts and would like to calculate the pace I achieve on runs/cycling. I've read the org spreadsheets introduction and found a thread about calculating units but ...
1
vote
1answer
140 views

How to insert the current date into a file using abbrev or similar?

I'd like to replicate something in emacs that I do in AutoHotkey all the time: type td have that string be replaced with the current date I'm trying to do this with Emacs abbrevs but I'm running ...
2
votes
1answer
230 views

How remove active date from a dynamic block using columnview

This post explains how you can setup dynamic blocks to create tables based on meeting minutes. In short, you can extract the TODOs of the minutes and put them in a table of actions like so: * ...
1
vote
1answer
235 views

Org (and org-capture) uses English for calendar dates, no matter what I do

The problem: When I use org-capture to write on my journal, it writes the month as April and the day as Friday. But everything in my system is in Portuguese, so it should be "abril" for the month, ...
3
votes
2answers
165 views

Check whether a string is a date in a specific format, e.g. "%Y-%m-%d"

I have a string and would like to check whether it contains a date in a given date format, e.g. "%Y-%m-%d", with format as for format-time-string. This is for a package and users can configure the ...
2
votes
1answer
118 views

Hide org-table rows outside certain date ranges?

Excel tables lets us show just the rows that have "July 2018" in a specific column, and hide the rest. Or to show "21st August 2017-30th August 2017, and also July 2018, and also all of 2019", and ...