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
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. ...
1
vote
1answer
31 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 ...
2
votes
1answer
26 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 ...
1
vote
1answer
125 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
1answer
31 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. ...
7
votes
1answer
220 views

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 ...
0
votes
1answer
38 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 ...
2
votes
2answers
835 views

Show sum of efforts for a day in Org-Agenda day title

I would like to show sum of efforts for all tasks for a day in Org-Agenda day title. E.g. for a week agenda there would be 7 sums for each of the day, in their respective titles. I think this could ...
0
votes
0answers
25 views

Excorporate using different date style/format

I am currently configuring excorporate as described in this post and stumbled upon a small issue. Basically, I use my calendar in a european style format, where dates are written as 20 Feb 2019 ...
0
votes
0answers
9 views

how to preserve org timestamp with duration on export

I have a timestamp like this in my .org file, which is a valid timestamp (i.e. generates agenda views when clicked): <2019-05-20 Mon 09:00-11:30> Note the duration (09:00-11:30) rather than a ...
1
vote
1answer
54 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:...
0
votes
2answers
82 views

Problem inserting timestamps when the year is far removed from the current date

I am editing an old text file that has each entry preceded by a date = 11/23/1983. I would like to reformat this date to a org timestamp. Using the various methods specified in the documentation is ...
1
vote
2answers
21 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’...
2
votes
1answer
107 views

How do I interconvert Calc's HMS forms and seconds?

Is there a built-in way to convert/toggle between GNU Emacs Calc's HMS forms and seconds? I'd also like to easily be able to add numbers as seconds and/or minutes to an existing HMS form.
0
votes
1answer
53 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
16 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 ...
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 ...
0
votes
2answers
73 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
58 views

Convert durations to start times

Problem I have some org-mode tables with a column containing the duration (or length) of musical tracks: |---+---------------------------------+-----------------------------------+----------| | # | ...
1
vote
0answers
62 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 ...
2
votes
1answer
93 views

How to add a time and a time interval in calc-mode?

How do I use calc to add a time interval to a moment in time (i.e., a date, or a time)? For instance, say I want to know what the time and day will be 8,000 minutes into the future? I know that t N ...
1
vote
0answers
21 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 ...
2
votes
0answers
46 views

Twilight times in addition to sunrise/sunset?

The sunrise-sunset function from solar.el computes sunrise and sunset. I would also like to have a function that computes the end/beginning of civil twilight (center of sun 6 deg below horizon) ...
4
votes
1answer
366 views

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?
3
votes
2answers
109 views

Convert between ISO week and a normal date

How can you convert between ISO year-week-day and an elisp date that can be sent to, e.g., format-time-string? I do not want to go via a string representation. I found the following old question on ...
1
vote
2answers
155 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 ...
2
votes
1answer
83 views

How to retrieve the date under the cursor in emacs calendar as the format day.month.year like 15.07.2018

Is there a way to retrieve the date under the cursor in emacs calendar as the format day.month.year like 05.07.2018 as a clipboard content?
6
votes
2answers
930 views

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: **...
1
vote
1answer
65 views

What is the reason for this erratic behavior in `time-subtract`?

I am attempting to calculate some time differences in org time strings using time-subtract. (time-subtract (org-parse-time-string "2018-04-16 Mon 14:00") (org-parse-time-string "2018-...
4
votes
2answers
495 views

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 "...
1
vote
1answer
104 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 "...
0
votes
0answers
73 views

Human-readable time interval function for Elfeed

Is there some built-in or third-party function I can use for the following? The function (elfeed-entry-date entry) returns the timestamp for an RSS feed entry, e.g. 1518282912.0. I would like to ...
0
votes
1answer
84 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
2
votes
0answers
44 views

Org-mode adding statistic cookie to date-tree lines in capture

In this video(timestamped to relevant section), I see this guy's org file in a date-tree with the [/] statistic cookie next to each YYYY-MM-DD headline. https://youtu.be/-2RXhPV_zgc?t=12m51s I'd ...
3
votes
0answers
119 views

How to get the (localized) day of the week lowercased in time-stamp-format?

The %:a allows to get the full weekday in the Time-stamp. My system-time-locale is fr_FR.UTF-8. I am using the Time-stamp in a Markdown file, inside a pandoc title block, which I export to html, so I ...
1
vote
3answers
80 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 ...
0
votes
1answer
234 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 ...
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 ...
3
votes
2answers
712 views

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 ...
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
1answer
254 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?
4
votes
2answers
460 views

Get time in AM/PM format

(format-time-string "%p") is empty in my Emacs. How I can format date in AM/PM format? That answer second part of Show time in different time zones UPDATE (length (format-time-string "%p")) ; is 0 ...
1
vote
0answers
97 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
0answers
419 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 ...
0
votes
1answer
198 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 ...
2
votes
1answer
286 views

Is there a view that can show time entered per day?

Basically I am after a method to find missing times. Currently I use this code to view times per task. #+BEGIN: clocktable :link t :maxlevel 10 :block week :scope file But I can not view if i am ...
1
vote
0answers
664 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
1k views

Current time timestamp in org-capture-templates

In org-mode org-capture templates, what is the way to insert current time timestamp? I've tried %U like so: (setq org-capture-templates (quote ( ("k" "Capture an item and schedule it for ...
7
votes
2answers
768 views

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 ...
2
votes
1answer
302 views

org-mode timestamp repeater interval manipulation

What are (if any) the lisp functions to read and write the repeater interval part of the org-mode timestamps? (The ones at the end of the timestamp string, which are optional, e.g. +1w or +6d in <...