...
 
Commits (1)
  • Rob Swindell's avatar
    New @-code: BIRTH for full-format user birthdate · 5cf2dd26
    Rob Swindell authored
    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>
    5cf2dd26
......@@ -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));
......