Skip to content

Commit

Permalink
Merge pull request #142 from bindable-ui/km/value_converter_99
Browse files Browse the repository at this point in the history
Allow SecondsToHmsValueConverter to overflow past 99 hours
  • Loading branch information
xEverybodyx authored Jun 23, 2022
2 parents 8a5e0c4 + 329c130 commit d01b08b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/value-converters/datetime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ describe('Datetime Value Converter', () => {
expect(component.toView(33 * 60 * 60)).toEqual('33:00:00');
});

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

it('should account for null or undefined', () => {
Expand Down
2 changes: 0 additions & 2 deletions src/value-converters/datetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export class SecondsToHmsValueConverter {

if (hoursDisplay.length === 1) {
hoursDisplay = `0${hours}`;
} else if (hoursDisplay.length > 2) {
hoursDisplay = '99';
}

if (minutesDisplay.length === 1) {
Expand Down

0 comments on commit d01b08b

Please sign in to comment.