All of lore.kernel.org
 help / color / mirror / Atom feed
* cal(1) changes
@ 2016-05-31 16:37 Karel Zak
  2016-05-31 21:44 ` Sami Kerola
  0 siblings, 1 reply; 2+ messages in thread
From: Karel Zak @ 2016-05-31 16:37 UTC (permalink / raw)
  To: util-linux


 I have committed two changes:

 * make it possible to specify month by name (according to locales)

    $ cal May 2017

 * accept timestamps / relative date

    $ cal '2 weeks ago'

    $ cal '+1year'

    $ cal 'tomorrow'

 We already have function to parse timestamps and I love it when use
 'git log --since', so why not use it for cal? (Note that timestamps
 are based on English and I think it's right thing (for KISS)).

 Comments?

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cal(1) changes
  2016-05-31 16:37 cal(1) changes Karel Zak
@ 2016-05-31 21:44 ` Sami Kerola
  0 siblings, 0 replies; 2+ messages in thread
From: Sami Kerola @ 2016-05-31 21:44 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On 31 May 2016 at 17:37, Karel Zak <kzak@redhat.com> wrote:
>  I have committed two changes:
>
>  * make it possible to specify month by name (according to locales)
>
>     $ cal May 2017
>
>  * accept timestamps / relative date
>
>     $ cal '2 weeks ago'
>
>     $ cal '+1year'
>
>     $ cal 'tomorrow'
>
>  We already have function to parse timestamps and I love it when use
>  'git log --since', so why not use it for cal? (Note that timestamps
>  are based on English and I think it's right thing (for KISS)).
>
>  Comments?

Sounds fitting. I am in favour.

I wonder if various time, calendar, interval expressions such as
examples above, and timestamp printers & parsers could be turned
into a libtime. If such library would exist the good question is if
anyone would want to use shared resource like this.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-31 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 16:37 cal(1) changes Karel Zak
2016-05-31 21:44 ` Sami Kerola

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.