How to parse relative time?

后端 未结 5 733
花落未央
花落未央 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:27

    This is likely not all that helpful since you're talking c# but since no one's mentioned it yet you can try to take a look at php's excellent and utterly insane native strtotime function

提交回复
热议问题