|
@@ -71,9 +71,13 @@ class Player {
|
|
|
this.Bezahlt = data[31]
|
|
|
this.BezahltAm = null
|
|
|
this.Matches = []
|
|
|
- this.isDoubles = this.Konkurrenz.match(/DM.*|[MW]D.*/)
|
|
|
- this.isJunior = (this.Geburtsdatum) ? this.Geburtsdatum.getTime() >= (new Date((new Date()).getFullYear() - 18, 11, 31, 23, 59, 59, 999)).getTime() : false
|
|
|
- this.isJuniorDP = (this.isDoubles & !!this.GeburtsdatumDP) ? this.GeburtsdatumDP.getTime() >= (new Date((new Date()).getFullYear() - 18, 11, 31, 23, 59, 59, 999)).getTime() : false
|
|
|
+ this.isDoubles = !!this.Konkurrenz.match(/DM.*|[MW]D.*/)
|
|
|
+ this.isJunior = (this.Geburtsdatum) ? this.Geburtsdatum.getTime() >= (new Date((new Date()).getFullYear() - 19, 11, 31, 23, 59, 59, 999)).getTime() : false
|
|
|
+ //!this.Geburtsdatum || console.log('DEBUG player:', this.Name, this.Vorname, this.Geburtsdatum, (new Date((new Date()).getFullYear() - 19, 11, 31, 23, 59, 59, 999)), this.Geburtsdatum.getTime(), (new Date((new Date()).getFullYear() - 18, 11, 31, 23, 59, 59, 999)).getTime())
|
|
|
+ this.isJuniorDP = (this.isDoubles && this.GeburtsdatumDP) ? this.GeburtsdatumDP.getTime() >= (new Date((new Date()).getFullYear() - 19, 11, 31, 23, 59, 59, 999)).getTime() : false
|
|
|
+ //!this.GeburtsdatumDP || console.log('DEBUG playerDP:', this.NameDP, this.VornameDP, this.GeburtsdatumDP, (new Date((new Date()).getFullYear() - 19, 11, 31, 23, 59, 59, 999)), this.GeburtsdatumDP.getTime(), (new Date((new Date()).getFullYear() - 18, 11, 31, 23, 59, 59, 999)).getTime())
|
|
|
+ //!this.Geburtsdatum || this.Geburtsdatum.getFullYear() !== 1999 || console.log('DEBUG 99:', this.Name, this.Vorname)
|
|
|
+ //!this.GeburtsdatumDP || this.GeburtsdatumDP.getFullYear() !== 1999 || console.log('DEBUG 99DP:', this.NameDP, this.VornameDP)
|
|
|
this.name = this.isDoubles ? `${this.Name} ${this.Vorname} / ${this.NameDP} ${this.VornameDP}` : `${this.Name} ${this.Vorname}`
|
|
|
if (this.Mobile && this.Mobile.match(reMobile)) {
|
|
|
this.phone = this.Mobile
|