Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
127 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
65 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
30 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
192 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 ...
1
vote
1answer
48 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
77 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 ...
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
15 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
57 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
45 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
54 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
79 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 ...
2
votes
0answers
78 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.
1
vote
0answers
18 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
36 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
300 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
74 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
141 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
61 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
829 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
51 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
324 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
87 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
61 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
72 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
42 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
93 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
75 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
177 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
742 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
639 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
912 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
195 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
428 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
84 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
378 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
177 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
247 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
626 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
946 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 ...
6
votes
2answers
669 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
719 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 ...
2
votes
1answer
262 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 <...
2
votes
1answer
138 views

Is it possible to change and freeze the current date-time in Emacs?

I'm a heavy Emacs Org-mode user and VERY dependent on the date functionality. I frequently enter events, receipts, etc. using capture templates after they've already occurred. My current solution is ...
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 ...
3
votes
1answer
50 views

Column of programmatically updated dates in org-mode

I'm trying to make a table in org-mode, the first column of which should be the Monday of each week starting with a date I specify. So, for example, if I specify Dec 14th, I would get a column with ...
1
vote
1answer
531 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
86 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 ...
2
votes
1answer
787 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: # -*- ...