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.

Other time-related tags and topics not included in the tag are: processor run time, , and .

Useful Links:

127 questions
22
votes
2 answers

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 was wondering if emacs could help here. Is there…
asmeurer
  • 1,552
  • 12
  • 30
17
votes
2 answers

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 set my time to a different timezone. I want dates in a…
wvxvw
  • 11,222
  • 2
  • 30
  • 55
13
votes
2 answers

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 function, which takes "15-03-12 Thu 16:49" and…
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
9
votes
3 answers

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 will return today's date. The documentation for the…
incandescentman
  • 4,111
  • 16
  • 53
9
votes
2 answers

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 become 03 May, and even 31 Dec 2017 after adding 15…
deshmukh
  • 1,852
  • 13
  • 29
9
votes
2 answers

Counting the number of days that have passed since a certain date

I have an org-mode document in which I wish to keep track of the number of days that have passed since a certain date. Is there a built in function for this, or will I be forced to write a custom elisp function to accomplish this?
davorb
  • 193
  • 4
9
votes
2 answers

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 to use a custom format for this one buffer? I'd…
mankoff
  • 4,108
  • 1
  • 22
  • 39
7
votes
2 answers

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 date -d "next wed" I believe that with the output…
David D.
  • 113
  • 6
7
votes
2 answers

Multiple Scheduled Timestamps for One Task

Suppose I want to be reminded to water my plants on Monday, Wednesday, and Friday, AND on any of the following days, if for some reason I miss the scheduled days. I originally tried the following: *** water plants (1,3,5) SCHEDULED: <2016-08-29…
dwrz
  • 281
  • 1
  • 9
6
votes
4 answers

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 the focus stay on the mini-buffer. A work-around…
AbstProcDo
  • 1,231
  • 5
  • 15
6
votes
3 answers

Show time in different time zones

I take a lot of different MOOC and each class declare own deadline relative to some time zone. Are there any Emacs mode that show date/time in buffer for several selected time zones in same time? I expect that mode should understand usual time zone…
gavenkoa
  • 3,352
  • 19
  • 36
6
votes
2 answers

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 ((current-prefix-arg 4)) ;; emulate C-u (org-time-stamp…
Leo Ufimtsev
  • 4,488
  • 3
  • 22
  • 45
5
votes
1 answer

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/caddy :PROPERTIES: :description: Fast, multi-platform…
Delapouite
  • 215
  • 1
  • 6
5
votes
2 answers

Convert Unix time to Org-mode timestamp

How can I convert a Unix time to an Org-mode local timestamp? For example (convert 1523473110) should return <2018-04-11 Wed 15:58:30>. I found org-timestamp--to-internal-time, but that uses "Emacs internal time" and it's going the wrong way…
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
5
votes
1 answer

Change date from active to inactive

I want to change an active date <2017-12-10 17:04> to inactive date [2017-12-10 17:04] and vice versa. How do I do that?
deshmukh
  • 1,852
  • 13
  • 29
1
2 3
8 9