[ New messages · Members · Forum rules · Search · Login ]  
  • Page 1 of 1
  • 1
Date format in last promotion field on the forums.
remoDate: Saturday, 2015/May/09, 11:29 PM | Message # 1
Thursday, February 12th, 2015
Group: Administrators
Messages: 1010
Status: Offline
I tried to write some code to parse the dates in this field. Only half of them were readable

Code
[root@ip-172-31-45-222 ~]# cat users.txt | cut -d'|' -f1,15 | grep -Ev "\|$" | while read nameDatePair; do echo $nameDatePair | cut -d'|' -f1 | tr '\n' '|' ; DATE=$(date --date="$(echo $nameDatePair | cut -d'|' -f2 | tr -d '.,' | sed 's/th//g' | sed 's/rd//g' | sed 's/st//g' | sed 's/nd//g')" 2>&1) ; echo $DATE ; done | wc -l
306
[root@ip-172-31-45-222 ~]# cat users.txt | cut -d'|' -f1,15 | grep -Ev "\|$" | while read nameDatePair; do echo $nameDatePair | cut -d'|' -f1 | tr '\n' '|' ; DATE=$(date --date="$(echo $nameDatePair | cut -d'|' -f2 | tr -d '.,' | sed 's/th//g' | sed 's/rd//g' | sed 's/st//g' | sed 's/nd//g')" 2>&1) ; echo $DATE ; done | grep invalid | wc -l
150


Among the various things to be found in this field:
date: invalid date ‘Suay March 9 2014’
date: invalid date ‘Moay April 21 2014’
date: invalid date ‘Satuay April 5 2014’
date: invalid date ‘Wednesdsay April 30 2014’
date: invalid date ‘Augu 8 2014’
date: invalid date ‘Satuay Augu 17 2013’
date: invalid date ‘Failure to Pass Cadet Te’
date: invalid date ‘2014/June/22’

In particular this Moay Suay Augu thing is very common. Whoever that was is a real asshat.

 
remoDate: Saturday, 2015/May/09, 11:40 PM | Message # 2
Thursday, February 12th, 2015
Group: Administrators
Messages: 1010
Status: Offline
AFTER INSERTING SPECIAL DERETARDIFICATION CODE...

Code
cat users.txt | cut -d'|' -f1,15 | grep -Ev "\|$" | while read nameDatePair; do echo $nameDatePair | cut -d'|' -f1 | tr '\n' '|' ; DATE=$(date --date="$(echo $nameDatePair | cut -d'|' -f2 | tr '.,-/' ' ' | sed 's/th//g' | sed 's/rd//g' | sed 's/st//g' | sed 's/nd//g' | sed 's/Suay/Sunday/' | sed 's/Satuay/Saturday/' | sed 's/Moay/Monday/' | sed 's/Wednesdsay/Wednesday/' | sed 's/Augu/August/' | sed 's/Satuday/Saturday/')" 2>&1) ; echo $DATE ; done | grep invalid


Dallice|date: invalid date ‘Failure to Pass Cadet Te’
Pridominus|date: invalid date ‘Failure to Pass Cadet Te’
Syndigoism|date: invalid date ‘Failure to Pass Cadet Te’
rgnix|date: invalid date ‘Saturday 2014 June 21’
Camysae|date: invalid date ‘2014 June 22’
Gigglesmirk|date: invalid date ‘2014 June 22’
TeSsElAtOr|date: invalid date ‘2014 June 22’
 
DoadriftDate: Sunday, 2015/May/10, 4:57 AM | Message # 3
Sunday, May 3rd, 2015
Group: Blocked
Messages: 842
Status: Offline


Ex-Fleet Admiral Doadrift
Slayer of Emu's,
Pacifist,
Lover.
 
  • Page 1 of 1
  • 1
Search:

Free website builderuCoz