mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-04-26 21:19:11 +00:00
45 lines
16 KiB
HTML
45 lines
16 KiB
HTML
![]() |
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Org mode timestamps</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
|
||
|
MathJax = {
|
||
|
tex: {
|
||
|
inlineMath: [ ['$','$'], ['\(','\)'] ],
|
||
|
displayMath: [ ['$$','$$'], ['[',']'] ]
|
||
|
},
|
||
|
options = {
|
||
|
processHtmlClass = "math"
|
||
|
}
|
||
|
}
|
||
|
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Org mode timestamps</h1><section class="post-metadata"><span>Date: <!-- -->2020-04-21 19:44:15 +08:00</span><span>Date modified: <!-- -->2021-05-04 20:52:15 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a href="/wiki/text.org-mode.timestamps#timestamps-and-durations" class="toc-link toc-link-h1">Timestamps and durations</a></li><li class="toc-item toc-item-h1"><a href="/wiki/text.org-mode.timestamps#deadlines-and-schedules" class="toc-link toc-link-h1">Deadlines and schedules</a></li><li class="toc-item toc-item-h1"><a href="/wiki/text.org-mode.timestamps#repeated-tasks" class="toc-link toc-link-h1">Repeated tasks</a></li></ol></nav><p>As previously stated, <a href="/wiki/2020-04-20-16-51-40">Org mode</a> is first created as an outliner enabling you to manage tasks.
|
||
|
Here's some of the features you might be interested when using it as such.
|
||
|
</p><h1 id="timestamps-and-durations">Timestamps and durations</h1><p>Being a personal information tool, Org mode heavily features timestamps.
|
||
|
</p><pre class="src-block"><code class="language-org"><2021-04-21 Wed>
|
||
|
</code></pre><p>You can easily set a timestamp with <code class="inline-code">org-time-stamp</code> that comes with an interactive calendar and a prompt to indicate the date and time.
|
||
|
The <a href="https://orgmode.org/manual/The-date_002ftime-prompt.html">prompt</a> is more useful since you can quickly enter relative values such as:
|
||
|
</p><ul><li><p><code class="inline-verbatim">+1d</code> for tomorrow.
|
||
|
</p></li><li><p><code class="inline-verbatim">2020-05-01 +23d</code> means 23 days after the 2020-05-01.
|
||
|
</p></li><li><p><code class="inline-verbatim">+4d 10:00+2</code> for 4 days later starting from 10:00 to 12:00.
|
||
|
</p></li><li><p><code class="inline-verbatim">+1m 1pm+3</code> for a month later starting from 1:00 PM to 4:00 PM.
|
||
|
</p></li></ul><p>Durations are made by putting a pair of dashes between two timestamps.
|
||
|
</p><pre class="src-block"><code class="language-org"><2021-04-22 Thu>--<2021-04-25 Sun>
|
||
|
</code></pre><p>You can quickly create a duration by running <code class="inline-code">org-time-stamp</code> two times consecutively.
|
||
|
</p><h1 id="deadlines-and-schedules">Deadlines and schedules</h1><p>In Org mode agenda view, it can show deadlines and schedules by prepending the timestamps with <code class="inline-verbatim">DEADLINE</code> and <code class="inline-verbatim">SCHEDULED</code>, respectively.
|
||
|
</p><pre class="src-block"><code class="language-org">DEADLINE: <2021-04-26 Mon 22:00>
|
||
|
SCHEDULED: <2021-04-25 Sun 20:00>
|
||
|
</code></pre><ul><li><p>Deadline entries make up the tasks that has to be done by the specified datetime.
|
||
|
When present in the agenda, it will warn an issue when the task is not done after the deadline had passed.
|
||
|
</p></li><li><p>Scheduled entries indicate the tasks that you will do starting from the timestamp.
|
||
|
When present in the agenda, it will simply remind you to do the task until done.
|
||
|
</p></li></ul><h1 id="repeated-tasks">Repeated tasks</h1><p>One can set <a href="https://orgmode.org/manual/Repeated-tasks.html">repeated tasks</a> in the following format.
|
||
|
</p><pre class="src-block"><code class="language-org">SCHEDULED: <2020-06-22 Mon +2d>
|
||
|
</code></pre><p>Any missed session will cause the agenda to keep overdued sessions and accumulate to repeat the tasks 'X' number of times with the number of overdued sessions.
|
||
|
</p><p>Some tasks does not work this way, however.
|
||
|
You don't need to replace the batteries 5 times or brush your teeth 10 times to make up for it.
|
||
|
For this, you can do the following.
|
||
|
</p><pre class="src-block"><code class="language-org">SCHEDULED: <2020-06-22 Mon ++2d>
|
||
|
</code></pre><p>One cool thing about it if you mark a task as done, it will simply create an entry of the task completed and update the base date.
|
||
|
</p><pre class="src-block"><code class="language-org">* TODO Watch the lectures from Brian Harvey's SICP series (https://archive.org/details/ucberkeley-webcast-PL3E89002AA9B9879E?sort=titleSorter)
|
||
|
SCHEDULED: <2020-06-24 Wed .+2d>
|
||
|
:PROPERTIES:
|
||
|
:LAST_REPEAT: [2020-06-22 Mon 22:01]
|
||
|
:END:
|
||
|
- State "DONE" from "TODO" [2020-06-22 Mon 22:01]
|
||
|
</code></pre><section><h2>Backlinks</h2><ul><li><a href="/wiki/2020-04-20-16-51-40">Org mode</a></li></ul></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2020-04-21 19:44:15 +08:00\"","date_modified":"\"2021-05-04 20:52:15 +08:00\"","language":"en","source":""},"title":"Org mode timestamps","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"timestamps-and-durations"},"children":[{"type":"text","value":"Timestamps and durations"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/text.org-mode.timestamps#timestamps-and-durations"},"children":[{"type":"text","value":"Timestamps and durations"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"deadlines-and-schedules"},"children":[{"type":"text","value":"Deadlines and schedules"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/text.org-mode.timestamps#deadlines-and-schedules"},"children":[{"type":"text","value":"Deadlines and schedules"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"repeated-tasks"},"children":[{"type":"text","value":"Repeated tasks"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/text.org-mode.timestamps#repeated-tasks"},"children":[{"type":"text","value":"Repeated tasks"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"As previously stated, "},{"type":"element","tagName":"a","properties":{"href":"/2020-04-20-16-51-40"},"children":[{"type":"text","value":"Org mode"}]},{"type":"text","value":" is first created as an outliner enabling you to manage tasks.\nHere's some of the features you might be interested when using it as such.\n"}]},{"type":"element","tagName":"h1","properties":{"id":"timestamps-and-durations"},"children":[{"type":"text","value":"Timestamps and durations"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Being a personal information tool, Org mode heavily features timestamps.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-org"]},"children":[{"type":"text","value":"\u003c2021-04-21 Wed\u003e\n"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can easily set a timestamp with "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"org-time-stamp"}]},{"type":"text","value":" that comes with an interactive calendar and a prompt to indicate the date and time.\nThe "},{"type":"element","tagName":"a","properties":{"href":"https://orgmode.org/manual/The-date_002ftime-prompt.html"},"children":[{"type":"text","value":"prompt"}]},{"type":"text","value":" is more useful since you can quickly enter relative values such as:\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"+1d"}]},{"type":"text","value":" for tomorrow.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":
|