GH-37288: [MATLAB] Add an arrow.internal.validate.temporal.dateUnit
helper function
#37289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
To mirror the
arrow.internal.validate.temporal.timeUnit
helper function added in #37250, this pull request adds anarrow.internal.validate.temporal.dateUnit
helper function.This helper function can be used to simplify the implementation of
arrow.type.Date32Type
andarrow.type.Date64Type
.What changes are included in this PR?
Added a new helper function
arrow.internal.validate.temporal.dateUnit
.Updated comments and variable names in
arrow.internal.validate.temporal.timeUnit
for consistency witharrow.internal.validate.temporal.dateUnit
and to reflect planned changes to Arrow type class hierarchy:TimeType
andDateType
inherit fromTemporalType
Time32Type
andTime64Type
inherit fromTimeType
Date32Type
andDate64Type
inherit fromDateType
Are these changes tested?
Yes.
tDateUnit
.tTimeUnit
for consistency with newtDateUnit
test class.Are there any user-facing changes?
No.
arrow.internal.validate.temporal.dateUnit
is an internal helper function.arrow.internal.validate.temporal.dateUnit
helper function #37288