Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
800 views

in yasnippet, how to insert variable date with fixed time of day?

I want a yasnippet to insert an org-mode date and time. The date should be today's date, but the time should be fixed. So far my snippet correctly inserts today's date, but not the time: # -*- ...
2
votes
1answer
65 views

Query org agenda build time?

Q: how can I get the last time I built the org agenda buffer? I've set an idle timer to rebuild my org agenda buffer every x minutes. It works fine, but it's inefficient to rebuild if the agenda ...
4
votes
1answer
356 views

Display months/days or timestamps in another language than English

Setup: GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL compiled from EmacsW64. Windows 7 x64 Dutch version. Situation: When I'm evaluating the following snippet: (...
0
votes
1answer
139 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. ...
7
votes
1answer
932 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
2answers
573 views

Yasnippet invoked org-time-stamp function inserts double timestamp

I created a yasnippet template to quickly timestamp a note I'd like to make in org-mode. The body of the yasnippet file reads $0 :PROPERTIES: :CREATED: `(org-insert-time-stamp nil t t)` :END: ...
3
votes
2answers
650 views

Converting plain text to dates

Is it possible to convert plain text dates to Org dates automatically? I have entries in the format: 16 February 2015 which I would like to convert to Org dates: <2015-02-16 Mon>
2
votes
1answer
711 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 (...
2
votes
1answer
537 views

Compare file modification time stamps

Background I am using Emacsclient to open files in a Emacs server. The server configuration depends on the content of a JSON configuration file. A Perl script can read the config file and write a ...
9
votes
2answers
819 views

Parsing formatted time string (inverse of format-time-string)

The format-time-string function takes a time argument like '(21761 64499 350937 0) and a format string like "%y-%m-%d %a %H:%M" and returns something like "15-03-12 Thu 16:49". What is the inverse ...
2
votes
1answer
97 views

meta-data related to the current buffer

How can I retrieve the date/time of the creation of the current file (file-date-time-of-creation) on my system? The same question can arise for the size. A related question was asked here. This is a ...
21
votes
2answers
923 views

Is there a mode to automatically update copyright years in files?

Usually around this time of year people start to realize that their copyright year is out of date in their files. This is particularly annoying if you like to put the copyright in every source file. I ...
1
vote
2answers
274 views

The time of the last change of the current buffer

Can Emacs determine the time of the last change (or the last edit) done to the current buffer? The buffer may has been saved or not.
1
vote
2answers
77 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
505 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 ...
7
votes
3answers
3k views

in org-mode, how to insert timestamp with today's date?

In a Lisp function, how do I instruct org to automatically insert a timestamp with today's date? I found the function org-insert-time-stamp, but I don't know how to provide an argument for it that ...
4
votes
1answer
3k 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
184 views

Invalid date: 01-Jan-2055

I recently downloaded Emacs 24.4 and sometimes I see an "invalid date" error in my buffer. When I am in eww, often I try to click (RET) a link and I get: error in process sentinel: Invalid date: 01-...
6
votes
2answers
1k views

How can I change Org-mode time format for one buffer?

In general all timestamps in Org-mode appears as [YYYY-MM-DD Day]. I have one file (buffer) where I would like the format to be different. Either just [YYYY-MM-DD] or [YYYY-MM]. How do I tell Org-mode ...
6
votes
2answers
674 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 ...