use sscanf to extract info from a timestamp string. Now it supports 'YYY...

...Y-MM-DD' format. add a simple test case