| 118 | } |
| 119 | |
| 120 | StringVal DateFunctions::LongMonthName(FunctionContext* context, const DateVal& d_val) { |
| 121 | if (d_val.is_null) return StringVal::null(); |
| 122 | DateValue dv = DateValue::FromDateVal(d_val); |
| 123 | |
| 124 | int year, month, day; |
| 125 | if (!dv.ToYearMonthDay(&year, &month, &day)) return StringVal::null(); |
| 126 | |
| 127 | DCHECK_GE(month, 1); |
| 128 | DCHECK_LE(month, 12); |
| 129 | const string& mn = |
| 130 | TimestampFunctions::MONTH_NAMES[TimestampFunctions::CAPITALIZED][month - 1]; |
| 131 | return StringVal(reinterpret_cast<uint8_t*>(const_cast<char*>(mn.data())), mn.size()); |
| 132 | } |
| 133 | |
| 134 | DateVal DateFunctions::NextDay(FunctionContext* context, const DateVal& d_val, |
| 135 | const StringVal& weekday) { |
nothing calls this directly
no test coverage detected