[misc] Code factorisation regarding time/duration parsing

Hello,

While investigating a slight bug (or feature request, if you like :) )
in the time/duration parsing, I noticed that some code is duplicated.

For instance, it looks like the code that parses durations of the form
"+2d4h50m" is roughly the same:

  in "day.c", l. 607 (function "day_edit_duration")
  in "apoint.c", l. 217

The point is that it's not *exactly* the same (variable names differ),
which makes it difficult to change the behavior consistently across
calcurse.

Do you think it's possible to factorise that out?

Regards,
Baptiste

-- 
GNU/Linux fan && Archlinux user
GPG key: 0x3309E3E0 -- http://invokk.net/baptiste-pubkey.asc

Links