Skip to content
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

[MATLAB] Add arrow.type.DateUnit enumeration class #37252

Closed
sgilmore10 opened this issue Aug 18, 2023 · 0 comments · Fixed by #37280
Closed

[MATLAB] Add arrow.type.DateUnit enumeration class #37252

sgilmore10 opened this issue Aug 18, 2023 · 0 comments · Fixed by #37280

Comments

@sgilmore10
Copy link
Member

Describe the enhancement requested

In support of adding arrow.type.Date32Type and arrow.type.Date64Type, we should first add a arrow.type.DateUnit enumeration class mirroring the arrow.type.TimeUnit enumeration class. arrow.type.DateUnit will have two values: Day and Millisecond.

Component(s)

MATLAB

@kevingurney kevingurney self-assigned this Aug 21, 2023
kevingurney added a commit that referenced this issue Aug 21, 2023
### Rationale for this change

In support of adding  `arrow.type.Date32Type` and `arrow.type.Date64Type`, this pull request adds a `arrow.type.DateUnit` enumeration class mirroring the `arrow.type.TimeUnit` enumeration class.

`arrow.type.DateUnit` will have two values: `Day` and `Millisecond`.

### What changes are included in this PR?

1. Added a new enumeration class `arrow.type.DateUnit` which mirrors the `arrow.type.TimeUnit` enumeration class.

**Example**:

```matlab
>> day = arrow.type.DateUnit.Day

day = 

  DateUnit enumeration

    Day

>> millisecond = arrow.type.DateUnit.Millisecond

millisecond = 

  DateUnit enumeration

    Millisecond
```

### Are these changes tested?

Yes.

1. Added a new test class `tDateUnit` for `arrow.type.DateUnit` tests.
2. Updated code for `tTimeUnit` for consistency with `tDateUnit`.

### Are there any user-facing changes?

Yes.

1. There is now a new user-facing `arrow.type.DateUnit` enumeration class.

### Future Directions

1. Add an `arrow.internal.validate.temporal.dateUnit` helper function that mirrors `arrow.internal.validate.temporal.timeUnit`.
2. #37229
3. #37230
* Closes: #37252

Lead-authored-by: Kevin Gurney <kgurney@mathworks.com>
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
@kevingurney kevingurney added this to the 14.0.0 milestone Aug 21, 2023
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…pache#37280)

### Rationale for this change

In support of adding  `arrow.type.Date32Type` and `arrow.type.Date64Type`, this pull request adds a `arrow.type.DateUnit` enumeration class mirroring the `arrow.type.TimeUnit` enumeration class.

`arrow.type.DateUnit` will have two values: `Day` and `Millisecond`.

### What changes are included in this PR?

1. Added a new enumeration class `arrow.type.DateUnit` which mirrors the `arrow.type.TimeUnit` enumeration class.

**Example**:

```matlab
>> day = arrow.type.DateUnit.Day

day = 

  DateUnit enumeration

    Day

>> millisecond = arrow.type.DateUnit.Millisecond

millisecond = 

  DateUnit enumeration

    Millisecond
```

### Are these changes tested?

Yes.

1. Added a new test class `tDateUnit` for `arrow.type.DateUnit` tests.
2. Updated code for `tTimeUnit` for consistency with `tDateUnit`.

### Are there any user-facing changes?

Yes.

1. There is now a new user-facing `arrow.type.DateUnit` enumeration class.

### Future Directions

1. Add an `arrow.internal.validate.temporal.dateUnit` helper function that mirrors `arrow.internal.validate.temporal.timeUnit`.
2. apache#37229
3. apache#37230
* Closes: apache#37252

Lead-authored-by: Kevin Gurney <kgurney@mathworks.com>
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants