-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DayOfYear, DayOfMonth, DayOfWeek Functions #2467
base: main
Are you sure you want to change the base?
Conversation
@@ -414,5 +414,7 @@ int64_t DateType::GetDatePart(DateType input, TimeUnit unit) { | |||
} | |||
return -1; | |||
} | |||
|
|||
bool DateType::OuterDate2YMD(DateType input, int32_t &year, int32_t &month, int32_t &day) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use i32 to replace i32_t
@@ -69,6 +69,8 @@ struct DateType { | |||
static bool Subtract(DateType input, IntervalType interval, DateType &output); | |||
|
|||
static int64_t GetDatePart(DateType input, TimeUnit unit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use i64 to replace int64_t
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
module; | ||
#include <__chrono/weekday.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the header file look so weird?
|
||
module; | ||
|
||
import stl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move import after 'export module day_of_month;'
|
||
module; | ||
|
||
import stl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move import after 'export module xxxx'
|
||
module; | ||
|
||
import stl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move import after 'export module xxxx'
@@ -59,6 +59,8 @@ struct DateTypeStd { | |||
static bool Subtract(DateTypeStd input, IntervalType interval, DateTypeStd &output); | |||
|
|||
static int64_t GetDatePart(DateTypeStd input, TimeUnit unit); | |||
|
|||
static bool OuterDate2YMD(int32_t days, std::chrono::year_month_day &ymd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int32_t -> i32
@@ -108,4 +108,14 @@ bool DateTimeType::IsDateTimeValid(int32_t year, int32_t month, int32_t day, int | |||
return TimeType::IsTimeValid(hour, minute, second) and DateType::IsDateValid(year, month, day); | |||
} | |||
|
|||
|
|||
bool DateTimeType::OuterDateTime2YMD(int32_t days, std::chrono::year_month_day &ymd) { | |||
int32_t year, month, day; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int32_t->i32
What problem does this PR solve?
Ad DayOfYear, DayOfMonth, DayOfWeek Functions
Issue link: (#2033)
Type of change