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
1 answer
29 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-...
user avatar
0 votes
1 answer
50 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 ...
user avatar
  • 83
5 votes
1 answer
149 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/...
user avatar
0 votes
1 answer
29 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 ...
user avatar
  • 3,445
0 votes
1 answer
79 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 ...
user avatar
  • 288
0 votes
1 answer
28 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&...
user avatar
  • 977
1 vote
1 answer
115 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 ...
user avatar
  • 608
0 votes
2 answers
45 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 ...
user avatar
  • 215
2 votes
1 answer
28 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--...
user avatar
  • 1,785
0 votes
0 answers
52 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?
user avatar
  • 3,445
0 votes
1 answer
66 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 ...
user avatar
  • 103
3 votes
1 answer
132 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 ...
user avatar
0 votes
2 answers
187 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 ...
user avatar
0 votes
1 answer
38 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 ...
user avatar
2 votes
1 answer
129 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. ...
user avatar
  • 7,267
4 votes
1 answer
349 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-...
user avatar
2 votes
1 answer
222 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 (< ...
user avatar
0 votes
1 answer
136 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 | |------------------+----------+----------+----------...
user avatar
  • 326
1 vote
1 answer
83 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 ...
user avatar
2 votes
1 answer
85 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 ...
user avatar
1 vote
0 answers
41 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 ...
user avatar
  • 156
0 votes
1 answer
36 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?
user avatar
  • 807
1 vote
1 answer
42 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: ...
user avatar
  • 1,060
0 votes
0 answers
35 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"))) (...
user avatar
  • 655
2 votes
2 answers
259 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 ...
user avatar
  • 523
0 votes
1 answer
129 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 (...
user avatar
1 vote
0 answers
132 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 ...
user avatar
  • 268
1 vote
0 answers
61 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, ...
user avatar
0 votes
1 answer
54 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 ...
user avatar
  • 263
1 vote
1 answer
161 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 ...
user avatar
  • 125
2 votes
1 answer
244 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: * ...
user avatar
  • 87
1 vote
1 answer
278 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, ...
user avatar
3 votes
2 answers
219 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 ...
user avatar
  • 2,480
2 votes
1 answer
168 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 ...
user avatar
  • 137
0 votes
1 answer
49 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 ==========...
user avatar
  • 1,099
6 votes
4 answers
616 views

Insert an arbitrary timestamp

C-c . could insert the timestamp of the current date and C-u C-c . insert the current datetime. I find it very difficult to insert an arbitrary datetime. Operations over Calendar are invalid since ...
user avatar
  • 1,099
0 votes
0 answers
526 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 | #+...
user avatar
  • 137
0 votes
2 answers
130 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, ...
user avatar
  • 94
1 vote
1 answer
70 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 ...
user avatar
  • 397
3 votes
2 answers
211 views

Apply different function to each element in list?

I have a time-stamp of a video formatted as "00:00:00,000" such that "%H:%M:%s,%3N". I am want to eventually use this timestamp as part of an in-interval-p function where I take two timestamps and a ...
user avatar
  • 303
4 votes
2 answers
183 views

Easily update dates for a recurrent set of TODOs in org mode

Every semester I teach the same course and for every semester there are several TODOs that should, at least initially, have the same dates relative to the starting date (i.e. the first day of class). ...
user avatar
  • 94
3 votes
1 answer
754 views

org column view with date calculations

* TODO fix this bug asap :PROPERTIES: :UPDATE: writing test cases almost there! :LASTUPDATED: 2019-11-25 :DEADLINE: 2019-11-30 :END: * TODO update that documentation :PROPERTIES: :UPDATE: updating my ...
user avatar
  • 149
1 vote
0 answers
59 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 ...
user avatar
  • 1,060
2 votes
1 answer
285 views

Customising the increments in an org-mode timestamp

When I create an appointment in org-agenda I make use of timestamps. The item is created with today's date and time and I then place my cursor on the date and time respectively and use S-up or S-down ...
user avatar
  • 1,060
4 votes
2 answers
495 views

How to set schedule and deadline for entires being inserted via org-capture template file?

I'm trying to leverage the power of org capture templates. There are a few tasks I know I will be scheduling on particular dates of the month. Setting their schedule and deadline in the capture ...
user avatar
0 votes
1 answer
126 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 ...
user avatar
1 vote
2 answers
71 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’...
user avatar
  • 2,099
1 vote
1 answer
55 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. ...
user avatar
  • 165
0 votes
1 answer
59 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 ...
user avatar
  • 1,785
0 votes
1 answer
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 ...
user avatar
  • 1,099