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.
128
questions
0
votes
1
answer
55
views
How to set milliseconds in a timestamp created by seconds-to-time?
I have a milliseconds-since-epoch value such as 1698089051778 that I want to convert to a human readable string.
I use (seconds-to-time (/ ms-since-apoch 1000)) to convert from string to timestamp and ...
0
votes
0
answers
24
views
How to write BCE dates in org-mode
I need to write BCE dates in org-mode. I'm particular about consistency and it kills me to have to write dates two different ways.
I'm hoping there's something like [-7000-01-01] to denote January 1st ...
0
votes
2
answers
81
views
how to swap month with day
I have a file with the date of birthday of my friends, I use this to remember me the date if birthday...But I have a problem: the date are set in the US way (month-days-year). I would like to change ...
1
vote
2
answers
183
views
Converting 'day' value to a timestamp
Org agendas use 'day' values in various APIs. I'd like to continue using the wonderful ts.el package to keep all my own automation using a timestamp implementation that clicks in my own head. (Elisp's ...
0
votes
0
answers
16
views
Bulk rescheduling agenda items without altering time of day or DEADLINE?
I currently bulk reschedule agenda items using:
(setq org-agenda-bulk-custom-functions
'((?D (lambda () (call-interactively 'org-agenda-date-later)))))
This command can be used without a prefix ...
0
votes
1
answer
33
views
Prevent temporary buffer from overwriting main buffer
I am encountering a strange behavior where any temporary buffer overwrites the main buffer content.
Using org time-stamp for example; the expected behavior is:
Invoke org time-stamp from within an ...
0
votes
0
answers
21
views
Repeat an hourly task in org-agenda grid
Why an hourly scheduled (repeating) task would appear only once in org-agenda grid? I assumed that this entry should appear again (at 17:09, 18:09, 19:09...).
This org-agenda is generated with:
(...
0
votes
1
answer
49
views
Show repeated tasks in org-agenda grid?
Is there any way to get repeated tasks to appear in org-agenda grid? Right now they are always shown at the bottom.
In this example the tasks was scheduled to repeat every day at 12:00.
0
votes
0
answers
35
views
Calculate collective duration of remaining todo list items?
I want Emacs to automatically calculate the duration of my remaining todo list items.
E.g. I have:
- [X] Item #0
- [ ] Item #1
- [ ] Item #2
And I need to define item duration somehow, not sure of ...
1
vote
1
answer
278
views
How do I display time in the modeline for the UTC timezone?
My system's time zone is set to the local time zone, but I want the time zone for Emacs to be set to UTC.
I've tried using various different functions, like current-time-zone, current-time-string, ...
2
votes
0
answers
31
views
Correct conversion of time strings containing PM
I have reached the outer edges of frustration on this one. I want to take a time stamp that is in the format: "Jan 20, 2023 7:09 PM" and get an output like: (0 9 19 20 1 2023 nil -1 nil) ...
0
votes
1
answer
46
views
Call to `decoded-time-add` produces warning: obsolete timestamp with cdr 1
I have the following code:
(decoded-time-add
(make-decoded-time
:day 1
:month 1
:year 2023)
(make-decoded-time :year 1))
When I execute this the following warning gets put out:
obsolete ...
2
votes
1
answer
72
views
(display-time) is appending a random number
I added (display-time) to my .emacs file to display the TOD in the status line. What I get is:
11:31PM 1.27
No idea what 1.27 means, or why it changes randomly to other numbers of the form N.NN. I ...
0
votes
1
answer
96
views
Get time at a different time zone
I want to get the time at a different time zone. I have noticed world-clock, which to set up needs one to configure world-clock-list. The problem is what to write in world-clock-list. There is the ...
-3
votes
1
answer
29
views
Writing time with characters
I would like to get the time, then insert the equivalent time using characters inside a
buffer.
Suppose the time is 14:42:17, I want to have the following
H_H_ ; Hours (12 hours)
...
0
votes
1
answer
188
views
Custom agenda view for tasks without dates and with/ without specific tag
I can have a custom agenda view that shows all tasks without a date with a custom agenda view defined thus:
'(org-agenda-custom-commands
(quote
(("d" "Undated tasks" alltodo ...
0
votes
1
answer
145
views
How can I have different Emacs `org-mode` date time format for a heading and sub-heading?
I'd like to tidy my current workflow practice on org-mode.
Each day I check out my org-mode agenda which lists appointments
Then I jot down/write a time boxed plan which can then merge with the org-...
0
votes
1
answer
93
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 ...
5
votes
1
answer
240
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
1
answer
62
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
1
answer
538
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 ...
0
votes
1
answer
40
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&...
1
vote
1
answer
237
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
2
answers
150
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
1
answer
47
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
0
answers
164
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
1
answer
134
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 ...
3
votes
1
answer
372
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
2
answers
536
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
1
answer
106
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 ...
2
votes
1
answer
202
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.
...
4
votes
1
answer
687
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-...
2
votes
1
answer
597
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 (< ...
0
votes
1
answer
261
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 |
|------------------+----------+----------+----------...
2
votes
1
answer
96
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 ...
2
votes
1
answer
187
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
0
answers
102
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
1
answer
69
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
1
answer
50
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
0
answers
38
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
2
answers
308
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 ...
0
votes
1
answer
206
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
0
answers
251
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 ...
2
votes
0
answers
100
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
1
answer
80
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
1
answer
245
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
1
answer
276
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
1
answer
533
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
2
answers
462
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
1
answer
297
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 ...