I\'m looking for a plain C counterpart for date.js date.parse().
That is, something that understands \"week ago\" or \"yesterday\" as input. English-only is OK.
Date formatting is pretty gruesome, there is no easy way of doing this. You need to take into account day and month names of the selected language, then make sure you receive the data in a specific format: "dd/mm/yyyy", "day mon, yyyy" and so on. Also, as you say, you need to interpret some specific keywords, thus you need access to the current timestamp (date, time, or date&time) on the machine.
Hoping you need that for Linux, I think you can start reading from here: Convert textual time and date information back
Or you can simply tokenize your input string, by splitting it using some predefined separators (comma, slash, minus, space etc.), trimming the spaces of the tokens, and then implement an automata to handle the list of tokens and build your date variable. Make sure you add some restrictions for the input date format, and throw errors for wrong or incompatible tokens.