Skip to content

Instantly share code, notes, and snippets.

@ifknot
Created October 17, 2020 16:00
Show Gist options
  • Save ifknot/1ea4846b39dc82176bb7adfaf3165330 to your computer and use it in GitHub Desktop.
Save ifknot/1ea4846b39dc82176bb7adfaf3165330 to your computer and use it in GitHub Desktop.
convert int or string to dates
#pragma once
#include "data_structures.h"
namespace R {
/**
* @brief (R-ish) as_dates convert between string representations and objects of type r_date representing
* calendar dates.
*
* @param dates
* @param format - an override std::get_time compatible format string
*/
variant_vector as_dates(const variant_vector& dates, std::string format);
/**
* @brief (R-ish) as_dates convert between string representations and objects of type r_date representing
* calendar dates.
*
* @param dates
* @param format - an override std::get_time compatible format string b
*/
variant_vector as_dates(variant_vector&& dates, std::string format);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment