Commit 5cf2dd26 authored by Rob Swindell's avatar Rob Swindell

New @-code: BIRTH for full-format user birthdate

Use BIRTH instead of BDATE if you want MM/DD/YYYY (or DD/MM/YYYY) instead of MM/DD/YY or DD/MM/YY formatted birthdate display.

New aliases (for consistency): BIRTHFMT -> BDATEFMT and BIRTH:<fmt> -> BDATE:<fmt>
parent 1c7b77de
Pipeline #350 passed with stage
in 18 minutes and 13 seconds
......@@ -577,7 +577,7 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return cfg.sys_misc&SM_EURODATE ? "DD/MM/YY" : "MM/DD/YY";
}
if(strcmp(sp, "BDATEFMT") == 0) {
if(strcmp(sp, "BDATEFMT") == 0 || strcmp(sp, "BIRTHFMT") == 0) {
return birthdate_format(&cfg);
}
......@@ -838,7 +838,10 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
if(!strcmp(sp,"BDATE"))
return getbirthdstr(&cfg, useron.birth, str, maxlen);
if(strncmp(sp, "BDATE:", 6) == 0) {
if(strcmp(sp, "BIRTH") == 0)
return format_birthdate(&cfg, useron.birth, str, maxlen);
if(strncmp(sp, "BDATE:", 6) == 0 || strncmp(sp, "BIRTH:", 6) == 0) {
sp += 6;
c_unescape_str(sp);
memset(&tm,0,sizeof(tm));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment