public static TdrError.ErrorType tdrDate2Str(ref TdrVisualBuf buf, uint date) { TdrDate date2 = new TdrDate(); if (date2.parse(date) == TdrError.ErrorType.TDR_NO_ERROR) { object[] args = new object[] { date2.nYear, date2.bMon, date2.bDay }; return(buf.sprintf("{0:d4}-{1:d2}-{2:d2}", args)); } return(TdrError.ErrorType.TDR_ERR_INVALID_TDRDATE_VALUE); }
public static TdrError.ErrorType tdrDate2Str(ref TdrVisualBuf buf, uint date) { TdrDate tdrDate = new TdrDate(); TdrError.ErrorType result; if (tdrDate.parse(date) == TdrError.ErrorType.TDR_NO_ERROR) { result = buf.sprintf("{0:d4}-{1:d2}-{2:d2}", new object[] { tdrDate.nYear, tdrDate.bMon, tdrDate.bDay }); } else { result = TdrError.ErrorType.TDR_ERR_INVALID_TDRDATE_VALUE; } return(result); }