Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Manipulating dates with Chronic

Alex Leferry 2 edited this pageMay 17, 2018 ·4 revisions

A natural language date and time parser.

Examples

Changing time format

Selection

2018-03-21

Command

|chronic'%A, %d %B %Y'

Result

Wednesday, 21 March 2018

Incrementing / Decrementing dates

Selection

2018-03-21

Command

|chronic tomorrow %F

Result

2018-03-22

Grepping

Examples

Grep things to do over the next 7 days:

grep-period'To do''%F' today week

Configuration

define-command grep-period -params4.. -docstring'grep-period <pattern> <format> <time-start> <time-end> [argument…]: Grep period' %{%sh{  pattern=$1  format=$2  start=$3  end=$4shift 4  factory=day  format="($pattern.+$format)|($format.+$pattern)"  regex=$(    chronic-period"$format""$start""$end""$factory"|    paste --serial --delimiters'|')printf"grep '%s' %s""$regex""$@"}}
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp