| 626 | } |
| 627 | |
| 628 | TimestampVal TimestampFunctions::LastDay(FunctionContext* context, |
| 629 | const TimestampVal& ts) { |
| 630 | if (ts.is_null) return TimestampVal::null(); |
| 631 | const TimestampValue& timestamp = TimestampValue::FromTimestampVal(ts); |
| 632 | if (!timestamp.HasDate()) return TimestampVal::null(); |
| 633 | TimestampValue tsv(timestamp.date().end_of_month(), time_duration(0,0,0,0)); |
| 634 | TimestampVal rt_date; |
| 635 | tsv.ToTimestampVal(&rt_date); |
| 636 | return rt_date; |
| 637 | } |
| 638 | |
| 639 | IntVal TimestampFunctions::IntMonthsBetween(FunctionContext* context, |
| 640 | const TimestampVal& ts1, const TimestampVal& ts2) { |
nothing calls this directly
no test coverage detected