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
2
votes
1answer
144 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
3answers
110 views

How can I convert a list of integers to a string?

Let's say I have a list of integers, representing year, month, day for a date: (2017 8 21) and I want to format the list in one function call, as in (format "%04d-%02d-%02d" 2017 8 21) Is there an ...
1
vote
1answer
698 views

Convert org-time-stamp

I need a function that can determine whether an org-time-stamp in a table equals the current date. Example: #+NAME: test | date | breakfast | |------------------+-----------| | <2015-...
1
vote
1answer
59 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
58 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 (< ...
1
vote
1answer
108 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 ...
1
vote
1answer
148 views

Convert a timestamp to local time

I have a timestamp string "2011-01-23T16:18:46-08:00" and I want to convert it to my local time zone. (format-time-string "%Y-%m-%dT%H:%M:%S%z" (decode-time (parse-iso8601-time-string "...
1
vote
2answers
207 views

How do I pick a date in my new major mode?

I want to insert a date in the current buffer. I know the function calendar-cursor-to-date that when invoked gives back the date at which the cursor is. But how do I get that info back into my ...
1
vote
1answer
39 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 ...
1
vote
1answer
34 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: ...
1
vote
2answers
60 views

How to interpret buffer-display-time values?

I am trying to use buffer-display-time var, in order to come with a solution for this question. Having a look at the documentation, I get this: buffer-display-time is a variable defined in ‘buffer.c’...
1
vote
1answer
485 views

In elisp, how can I calculate the number of days remaining until a given date?

I feel like elisp (or org-mode) must have something like (days-until '2018-01-01) which would calculate the days between today and 2018-01-01. How would I go about implementing that?
1
vote
1answer
775 views

How to display date in Julian in the mode line?

The following setting display the date in Gregorian calendar in the mode line. (setq display-time-day-and-date t) (display-time) My question is how to change the above settings for date to be shown ...
1
vote
1answer
167 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, ...
1
vote
1answer
277 views

Determining the string formats for datetime-timezone

When loading a .log file I get the message Warning (emacs): Failed to determine system timezone; consider customizing ‘datetime-timezone’ variable Going to the customization menu, the options are ...
1
vote
2answers
125 views

unable to restart or update a timer

I have simple timer which makes sure a function is executed for every 10 seconds. (setq interval 10) (defun run-every-ten-seconds () (do-something)) (defun start-timer () (setq timer (run-...
1
vote
1answer
64 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 ...
1
vote
1answer
33 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
0answers
67 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 ...
1
vote
0answers
55 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, ...
1
vote
0answers
47 views

Sorting org files in Emacs Dired on the basis of the org time stamp in the file itself

Is there a way of sorting org files (.org) in Emacs Dired on the basis of the org time stamp in the file itself. With every org file I create, I insert an org time stamp near the top of the file. This ...
1
vote
1answer
48 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
0answers
86 views

Strategy for using Emacs as an event log?

I'd like to be able to use Emacs to track various events in my day-to-day life, such as paying a bill, going to an appointment, replacing oil, etc. The goal would be to be able to view this event in ...
1
vote
1answer
98 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:...
1
vote
0answers
31 views

Logbook clock entries as active/inactive time stamps in icalendar export

Is there a way to automatically have active/inactive timestamps updated in the body of the org node? My final goal is to have the clock entries included as events in icalendar export. Alternatively ...
1
vote
0answers
562 views

mode line time not updating

I'm using powerline for my modeline and I have placed a clock within the modeline. This clock is only updating when I'm within that buffer, if I have another buffer up the clock freezes until that ...
1
vote
0answers
805 views

Insert Current Date and Time with Custom Timestamp

I am trying to get org-mode to insert a custom timestamp with the current time. Something along these lines: 20160824 34|3 163000 (UTC) Which I believe should be the following: ("%Y%m%d %W|%u %H%M%...
1
vote
1answer
100 views

Alternative to “Time-stamp: <…>” [closed]

I seem to remember from several years ago, an alternative and better package and/or command to "Time-stamp: <...>". I can't seem to find it now. Does anyone know of this? I want to use this in C ...
0
votes
2answers
85 views

org-capture scheduled for next Tuesday (or Friday)

I'd like to create a capture template that automatically schedules the date for the upcoming Friday (if today is a Tuesday, Wednesday, Thursday) or for the upcoming Tuesday (if today is a Friday, ...
0
votes
1answer
55 views

test if a file has been updated within the current day

As I consume a lot of drugs, I created an org-mode file that updates the status of my stock every day. It is done at the start of Emacs and it slows down significantly. As I sometimes run Emacs on a ...
0
votes
1answer
318 views

I cannot manually edit date fields before closing bracket in org-mode buffer

I am aware of the syntax for creating repeated tasks in org-mode, but for some reason I am now unable to manually edit the text of the "Scheduled" and "Deadline" date fields to do this, unless I do ...
0
votes
1answer
77 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
1answer
43 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 ...
0
votes
1answer
39 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 ==========...
0
votes
1answer
366 views

What's the inverse of (format-time-string “%s”)?

Parsing formatted time string (inverse of format-time-string) asks for a complete inverse of format-time-string with the ability to specify the source format, but I really just need to get from a UNIX ...
0
votes
1answer
29 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
21 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?
0
votes
1answer
61 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 (...
0
votes
1answer
56 views

Programmatic way of calculating end of week/month/year

I'm trying to build functions that help me execute frequent sparse tree queries, using org-match-sparse-tree nil "<some_query>" in my code. Some of these queries need to contain constraints ...
0
votes
1answer
18 views

Additionally factor like 0.33 mail after enable to display time in linemode

I enabled time-show on the line-mode following the instruction of EmacsWiki: Display Time (display-time-mode 1) The single line was appended and it take effects but has side outputs Additionally ...
0
votes
1answer
86 views

Convert durations to start times

Problem I have some org-mode tables with a column containing the duration (or length) of musical tracks: |---+---------------------------------+-----------------------------------+----------| | # | ...
0
votes
2answers
260 views

elisp timedelta output format

When try to print timedelta as below: #+BEGIN_SRC elisp :results output (print (time-subtract (parse-time-string "2018-10-20 08:50:36.343") (parse-time-string "2018-10-20 08:47:43.029"))) #+...
0
votes
1answer
111 views

Count down timer whenever file is opened

C-C C-x ; can start count down timer. But I want to start the timer whenever I open any org file. I want to set it default for 10 minute. Kindly help
0
votes
1answer
17 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 ...
0
votes
0answers
28 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 #+...
0
votes
0answers
17 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
5 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
0answers
31 views

Emacs current-time value and Windows RealTimeIsUniversal

I have linux and windows dual booted on pc and linux is using utc as default while windows registry is set to yield utc time by setting qword:00000001 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\...
0
votes
0answers
28 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"))) (...
0
votes
0answers
195 views

Time-formatted output from org-table date- and time calculation?

I have an org-table for my timesheets. Part of it looks this: | Start | End | End - Start | | <2020-03-05 10:00> | <2020-03-05 Thu 14:30> | 0.1875 | #+...