package Ġcom . tan asi . m ang aj ap . utils . extensions Ċ Ċ import Ġcom . tan asi . m ang aj ap . M anga J ap Application Ċ import Ġjava . text . SimpleDateFormat Ċ import Ġjava . util .* Ċ Ċ fun ĠString . to Calendar ( pattern : ĠString ): ĠCalendar ? Ġ{ ĊĠĠĠ Ġreturn Ġtry Ġ{ ĊĠĠĠĠĠĠĠ ĠCalendar . getInstance (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . time Ġ= ĠSimpleDateFormat ( pattern , ĠM anga J ap Application . context . locale ()). parse ( this ) !! ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ġcatch Ġ( e : ĠException ) Ġ{ ĊĠĠĠĠĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCalendar . getInstance (). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġit . time Ġ= ĠSimpleDateFormat (" yyyy - MM - dd ĠHH : mm : ss ", ĠM anga J ap Application . context . locale ()). parse ( this ) !! ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} Ġcatch Ġ( e 1 : ĠException ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠString . is Email Valid (): ĠBoolean Ġ= Ġthis . matches ("^ [ a - zA - Z 0 - 9 . ! #$ % & '* +/ =? ^ _` { |} ~ - ]+ @ ([ a - zA - Z \\ - 0 - 9 ]+ \\. )+ [ a - zA - Z ]{ 2 , }$ ". to Regex ()) Ċ Ċ fun ĠString . is Pseudo Valid (): ĠBoolean Ġ= Ġthis . matches ("[ A - Za - z 0 - 9 _ ]{ 3 , 6 0 }". to Regex ()) Ċ Ċ fun ĠString . is Password Valid (): ĠBoolean Ġ= Ġthis . matches ("[ a - zA - Z 0 - 9 _ @\ $ ! % * # ?& ]{ 8 , 7 2 }". to Regex ())