Skip to content

Commit 8d5c78d

Browse files
committed
Make "Time Distance" live
1 parent 65a9f4b commit 8d5c78d

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

config/holes.toml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,18 +2005,28 @@ preamble = '''
20052005

20062006
['Time Distance']
20072007
category = 'Transform'
2008-
experiment = -1
20092008
preamble = '''
20102009
<p>
2011-
Transform a time distance given as a number of seconds to a human friendly string representation.
2010+
Transform a time distance given as a number of seconds to a human friendly
2011+
string representation.
2012+
2013+
<ul>
2014+
<li>
2015+
<strong>Zero</strong> represents the <strong>current moment</strong>,
2016+
to be printed as <em>now</em>.
2017+
<li>
2018+
<strong>Positive</strong> values represent the
2019+
<strong>future</strong>, to be printed with the <em>in</em> prefix.
2020+
<li>
2021+
<strong>Negative</strong> values represent the <strong>past</strong>,
2022+
to be printed with the <em>ago</em> suffix.
2023+
</ul>
2024+
20122025
<p>
2013-
<ul>
2014-
<li><strong>Zero</strong> represents the <strong>current moment</strong>, to be printed as <em>now</em>.
2015-
<li><strong>Positive</strong> values represent the <strong>future</strong>, to be printed with the <em>in</em> prefix,
2016-
<li> while <strong>negative</strong> values represent the <strong>past</strong>, to be printed with the <em>ago</em> suffix.
2017-
</ul>
2018-
The largest possible unit of time among a second, a minute (60 seconds), an hour (60 minutes), a day (24 hours), a week (7 days), a month (30 days) and a year (365 days) is always chosen
2019-
and the quantity is always rounded towards zero. Correct singular/plural of each unit must be used.
2026+
The largest possible unit of time among a second, a minute (60 seconds),
2027+
an hour (60 minutes), a day (24 hours), a week (7 days), a month (30 days)
2028+
and a year (365 days) is always chosen and the quantity is always rounded
2029+
towards zero. Correct singular/plural of each unit must be used.
20202030
'''
20212031

20222032
[Tongue-twisters]

db/a-schema.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ CREATE TYPE hole AS ENUM (
3636
'rock-paper-scissors-spock-lizard', 'roman-to-arabic', 'rule-110',
3737
'seven-segment', 'sierpiński-triangle', 'smith-numbers',
3838
'spelling-numbers', 'star-wars-opening-crawl', 'sudoku', 'sudoku-v2',
39-
'ten-pin-bowling', 'tongue-twisters', 'united-states', 'vampire-numbers',
40-
'van-eck-sequence', 'λ', 'π', 'τ', 'φ', '√2', '𝑒'
39+
'ten-pin-bowling', 'time-distance', 'tongue-twisters', 'united-states',
40+
'vampire-numbers', 'van-eck-sequence', 'λ', 'π', 'τ', 'φ', '√2', '𝑒'
4141
);
4242

4343
CREATE TYPE keymap AS ENUM ('default', 'vim');

0 commit comments

Comments
 (0)