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.
93
questions
0
votes
0answers
11 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 ...
0
votes
0answers
5 views
Strange sorting behavior for missing deadline and scheduled dates in org-agenda-sorting-strategy?
Running fresh (emacs -q), with the following org-mode items:
* TODO item 1
DEADLINE: <2021-03-01 Mon> SCHEDULED: <2021-02-27 Sat>
* TODO item 2
SCHEDULED: <2021-02-28 Sun>
* TODO ...
0
votes
1answer
17 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?
1
vote
1answer
33 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:
...
0
votes
0answers
28 views
Emacs current-time value and Windows RealTimeIsUniversal
I have linux and windows dual booted on pc and linux is using utc as default while windows registry is set to yield utc time by setting qword:00000001 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\...
0
votes
0answers
27 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")))
(...
2
votes
2answers
180 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 ...
0
votes
1answer
47 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 (...
1
vote
0answers
59 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 ...
1
vote
0answers
55 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, ...
0
votes
1answer
38 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 ...
1
vote
1answer
94 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 ...
2
votes
1answer
218 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:
* ...
1
vote
1answer
136 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, ...
3
votes
2answers
108 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 ...
2
votes
1answer
73 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 ...
6
votes
4answers
310 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 ...
0
votes
0answers
149 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 |
#+...
0
votes
2answers
83 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, ...
0
votes
1answer
30 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 ...
3
votes
2answers
179 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 ...
4
votes
2answers
127 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). ...
3
votes
1answer
393 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 ...
1
vote
0answers
45 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 ...
2
votes
1answer
132 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 ...
3
votes
2answers
273 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 ...
0
votes
1answer
51 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 ...
1
vote
2answers
51 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ā...
1
vote
1answer
47 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.
...
0
votes
1answer
55 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
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 ...
2
votes
2answers
490 views
Table formula for dates delta
Here my org table:
| | Start date | End date | State | Duration |
|---+------------------------+------------------------+-------+----------|
| # | <2019-01-02 Wed 10:...
0
votes
1answer
84 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
1answer
255 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 ...
0
votes
2answers
231 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")))
#+...
1
vote
0answers
84 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
85 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:...
2
votes
1answer
168 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
31 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
72 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)
...
3
votes
2answers
302 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 ...
2
votes
1answer
126 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?
1
vote
1answer
126 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
1k 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 "...
3
votes
1answer
165 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
1answer
144 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
105 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 ...
2
votes
0answers
61 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 ...
0
votes
1answer
110 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
7
votes
1answer
339 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 ...