mgaido91 commented on a change in pull request #23000: [SPARK-26002][SQL] Fix
day of year calculation for Julian calendar days
URL: https://github.com/apache/spark/pull/23000#discussion_r242453773
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -585,20 +598,30 @@ object DateTimeUtils {
* Return the number of days since the start of 400 year period.
* The second year of a 400 year period (year 1) starts on day 365.
*/
- private[this] def yearBoundary(year: Int): Int = {
- year * 365 + ((year / 4 ) - (year / 100) + (year / 400))
+ private[this] def yearBoundary(year: Int, isGregorian: Boolean): Int = {
Review comment:
shall we update also the `isLeapYear` method above?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]