File tree 2 files changed +2
-2
lines changed
modules/30-classes/80-abstract-classes
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ console.log(clock24.render()); // => '00 : 00'
27
27
// 12-часовой формат
28
28
class Clock12 extends Clock {
29
29
render(): string {
30
- const timeType = this .hours > 12 ? ' PM' : ' AM' ;
30
+ const timeType = this .hours >= 12 ? ' PM' : ' AM' ;
31
31
32
32
let currentHour = this .hours > 12 ? this .hours - 12 : this .hours ;
33
33
if (timeType === ' AM' && this .hours === 0 ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Clock from './index';
4
4
test ( 'GameObject' , ( ) => {
5
5
class Clock12 extends Clock {
6
6
render ( ) : string {
7
- const timeType = this . hours > 12 ? 'PM' : 'AM' ;
7
+ const timeType = this . hours >= 12 ? 'PM' : 'AM' ;
8
8
9
9
let currentHour = this . hours > 12 ? this . hours - 12 : this . hours ;
10
10
if ( timeType === 'AM' && this . hours === 0 ) {
You can’t perform that action at this time.
0 commit comments