Skip to content

WizardMac/TimeFormatStrings

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

Build status TimeFormatStrings

This handy C library can read and write time format strings in four formats: Excel (TFS_EXCEL), POSIX (TFS_POSIX), 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];
tfs_error_e error = tfs_convert("mm/dd/yyyy", TFS_EXCEL,
                                result, TFS_UTS35, sizeof(result));
if (error == TFS_OK) {
    printf("%s\n", result); /* prints "MM/dd/y" */
}

The POSIX format can be fed to strftime and strptime in order to present and parse specific time values.

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

About

Convert Excel, POSIX, Stata, and Unicode time format strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published