Skip to content

Commit

Permalink
Parse all ISO-8601 dates
Browse files Browse the repository at this point in the history
  • Loading branch information
l3kn committed Mar 18, 2024
1 parent 33e0b55 commit 3385097
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions awk/index.awk
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ $0 ~ review_data_drawer {
col = review_data_columns[j];
val = review_data[i][col];

# TODO: extract values as strings, parse in Emacs when
# necessary.
if (col == "due") {
# To speed up processing inside Emacs, parse
# values that match the ISO-8601 format in AWK.
if (val ~ /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$/) {
val = parse_time(val);
} else if (col == "position") {
val = escape_string(val);
Expand Down

0 comments on commit 3385097

Please sign in to comment.