myMPD
Internal API documentation
Loading...
Searching...
No Matches
datetime.h File Reference

Date and time functions. More...

#include <time.h>
Include dependency graph for datetime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

time_t parse_date (const char *str)
 
void readable_time (char *buf, time_t timestamp)
 

Detailed Description

Date and time functions.

Function Documentation

◆ parse_date()

time_t parse_date ( const char *  str)

Parses a YYYY-MM-DD string to a unix timestamp

Parameters
strstring to parse
Returns
time_t unix timestamp

◆ readable_time()

void readable_time ( char *  buf,
time_t  timestamp 
)

Appends a formatted time to the buffer

Parameters
bufalready allocated sds string
timestamptimestamp to display