Skip to content

Commit d01b08b

Browse files
authored
Merge pull request #142 from bindable-ui/km/value_converter_99
Allow SecondsToHmsValueConverter to overflow past 99 hours
2 parents 8a5e0c4 + 329c130 commit d01b08b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/value-converters/datetime.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ describe('Datetime Value Converter', () => {
5151
expect(component.toView(33 * 60 * 60)).toEqual('33:00:00');
5252
});
5353

54-
it('should not exceed 99 hours', () => {
55-
expect(component.toView(100 * 60 * 60)).toEqual('99:00:00');
54+
it('should exceed 99 hours', () => {
55+
expect(component.toView(100 * 60 * 60)).toEqual('100:00:00');
5656
});
5757

5858
it('should account for null or undefined', () => {

src/value-converters/datetime.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ export class SecondsToHmsValueConverter {
7575

7676
if (hoursDisplay.length === 1) {
7777
hoursDisplay = `0${hours}`;
78-
} else if (hoursDisplay.length > 2) {
79-
hoursDisplay = '99';
8078
}
8179

8280
if (minutesDisplay.length === 1) {

0 commit comments

Comments
 (0)