MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / lbug_date_to_string

Function lbug_date_to_string

src/c_api/value.cpp:1366–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1364}
1365
1366lbug_state lbug_date_to_string(lbug_date_t date, char** out_result) {
1367 tm tm{};
1368 if (lbug_date_to_tm(date, &tm) != LbugSuccess) {
1369 return LbugError;
1370 }
1371 char buffer[80];
1372 if (strftime(buffer, 80, "%Y-%m-%d", &tm) == 0) {
1373 return LbugError;
1374 }
1375 *out_result = convertToOwnedCString(buffer);
1376 return LbugSuccess;
1377}
1378
1379lbug_state lbug_date_from_string(const char* str, lbug_date_t* out_result) {
1380 try {

Callers 1

TEST_FFunction · 0.85

Calls 2

lbug_date_to_tmFunction · 0.85
convertToOwnedCStringFunction · 0.85

Tested by 1

TEST_FFunction · 0.68