-
Notifications
You must be signed in to change notification settings - Fork 11
/
TimezoneParams.js
executable file
·58 lines (46 loc) · 1 KB
/
TimezoneParams.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
module.exports = class TimezoneParams {
constructor() {
var tz = '';
var ipAddress = '';
var lang = 'en';
var latitude = '1000.0';
var longitude = '1000.0';
var location = "";
}
setTimezone(tz = '') {
this.tz = tz;
}
getTimezone() {
return this.tz;
}
setIPAddress(ipAddress = '') {
this.ipAdress = ipAddress;
}
getIPAddress() {
return this.ipAdress;
}
setLang(lang = 'en') {
this.lang = lang;
}
getLang() {
return this.lang;
}
setCoordinates(la = '1000.0', lo = '1000.0') {
if ((la >= -90 && la <= 90) && (lo >= -180 && lo <= 180)) {
this.latitude = la;
this.longitude = lo;
}
}
getLatitude() {
return this.latitude;
}
getLongitude() {
return this.longitude;
}
getLocation() {
return this.location;
}
setLocation(loc = "") {
this.location = loc;
}
}