How to parse relative time?

后端 未结 5 719
花落未央
花落未央 2020-12-18 23:55

This question is the other side of the question asking, \"How do I calculate relative time?\".

Given some human input for a relative time, how can you parse it? By

5条回答
  •  无人及你
    2020-12-19 00:29

    This: http://www.codeproject.com/KB/edit/dateparser.aspx Is fairly close to what you are trying to accomplish. Not the most elegant solution, but certainly might save you some work.

提交回复
热议问题