เช็ตเลขบัตร
This commit is contained in:
parent
03f269ddd0
commit
5d91ed91e4
1 changed files with 4 additions and 3 deletions
|
|
@ -230,9 +230,7 @@ class Extension {
|
||||||
|
|
||||||
public static ToThaiShortYear(value: Date) {
|
public static ToThaiShortYear(value: Date) {
|
||||||
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
|
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
|
||||||
return (
|
return yy.toString();
|
||||||
yy.toString()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static sumObjectValues(array: any, propertyName: any) {
|
public static sumObjectValues(array: any, propertyName: any) {
|
||||||
|
|
@ -247,6 +245,9 @@ class Extension {
|
||||||
|
|
||||||
public static CheckCitizen(value: string) {
|
public static CheckCitizen(value: string) {
|
||||||
let citizen = value;
|
let citizen = value;
|
||||||
|
if (citizen == null || citizen == "") {
|
||||||
|
return citizen;
|
||||||
|
}
|
||||||
if (citizen.length !== 13) {
|
if (citizen.length !== 13) {
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
HttpStatus.NOT_FOUND,
|
HttpStatus.NOT_FOUND,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue