Skip to main content
deleted 39 characters in body
Source Link
manatwork
  • 20.9k
  • 5
  • 53
  • 82

jq, 2020 15 characters

now+.|strftime("%Y")|gmtime[0] 

Sample run:

bash-5.0$ jq -r 'now+.|strftime("%Y")'|gmtime[0]' <<< 100000000000 5190 

Try it online!Try it online!

jq, 20 characters

now+.|strftime("%Y") 

Sample run:

bash-5.0$ jq -r 'now+.|strftime("%Y")' <<< 100000000000 5190 

Try it online!

jq, 20 15 characters

now+.|gmtime[0] 

Sample run:

bash-5.0$ jq 'now+.|gmtime[0]' <<< 100000000000 5190 

Try it online!

Source Link
manatwork
  • 20.9k
  • 5
  • 53
  • 82

jq, 20 characters

now+.|strftime("%Y") 

Sample run:

bash-5.0$ jq -r 'now+.|strftime("%Y")' <<< 100000000000 5190 

Try it online!