File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,22 @@ const personGenerator = {
77
77
}
78
78
}` ,
79
79
80
+ months :
81
+ {
82
+ 1 : "января" ,
83
+ 2 : "февраля" ,
84
+ 3 : "марта" ,
85
+ 4 : "апреля" ,
86
+ 5 : "мая" ,
87
+ 6 : "июня" ,
88
+ 7 : "июля" ,
89
+ 8 : "августа" ,
90
+ 9 : "сентября" ,
91
+ 10 : "октября" ,
92
+ 11 : "ноября" ,
93
+ 12 : "декабря"
94
+ } ,
95
+
80
96
GENDER_MALE : 'Мужчина' ,
81
97
GENDER_FEMALE : 'Женщина' ,
82
98
@@ -176,13 +192,13 @@ const personGenerator = {
176
192
177
193
randomGender : function ( ) {
178
194
179
- return this . randomIntNumber ( ) === 1 ? this . GENDER_MALE : this . GENDER_FEMALE ;
195
+ return this . randomIntNumber ( ) ? this . GENDER_MALE : this . GENDER_FEMALE ;
180
196
181
197
} ,
182
198
183
199
randomDate : function ( ) {
184
200
185
- const year = this . randomIntNumber ( 110 , 70 ) + 1900 ;
201
+ const year = this . randomIntNumber ( 104 , 70 ) + 1900 ;
186
202
const month = this . randomIntNumber ( 12 , 1 ) ;
187
203
188
204
const isEven = month % 2 === 0 ;
@@ -205,7 +221,11 @@ const personGenerator = {
205
221
206
222
const day = this . randomIntNumber ( maxDay , 1 ) ;
207
223
208
- return `${ day } .${ month } .${ year } ` ;
224
+
225
+
226
+ let textMonth = this . months [ month ]
227
+
228
+ return `${ day } ${ textMonth } ${ year } г.` ;
209
229
} ,
210
230
211
231
You can’t perform that action at this time.
0 commit comments