Convert Excel, Stata, and Unicode time format strings
C Ragel in Ruby Host Other
Failed to load latest commit information.
src More liberal parsing of Excel color codes Jan 18, 2016
test Tests for fractional seconds Dec 23, 2013
Makefile Support (ignore) numeric color codes Dec 30, 2015 README tweak Feb 8, 2015


This handy C library can read and write time format strings in three formats: Excel (TFS_EXCEL), Stata (TFS_STATA), and Unicode (TFS_UTS35).

It can also read, but not write, format strings in SAS format (TFS_SAS) and SPSS format (TFS_SPSS).

Example usage:

#include "tfs.h"

char result[100];
int error = tfs_convert("mm/dd/yyyy", TFS_EXCEL, result, TFS_UTS35);
if (error == 0) {
    printf("%s\n", result); /* prints "MM/dd/y" */

It is up to the developer to ensure the output buffer is large enough to hold the result.

Type "make" to build the library and "make test" to run the test suite.