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

time: make time.Weekday data type public so that it can be pattern matched #57

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion time/time.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,15 @@ impl PlainTime {
with_second(Self, Int) -> Self!
}

type Weekday
pub enum Weekday {
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
}
impl Weekday {
op_equal(Self, Self) -> Bool
to_string(Self) -> String
Expand Down
2 changes: 1 addition & 1 deletion time/weekday.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

enum Weekday {
pub enum Weekday {
Monday
Tuesday
Wednesday
Expand Down