-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
59 lines (51 loc) · 969 Bytes
/
test.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
57
58
59
function createPostRequest(data)
{
let request = {
"postData": {
"contents": JSON.stringify(data)
}
};
return request;
}
function createGetRequest(data)
{
let request = {
"parameters": data
}
return request;
}
function testGetMonth() {
console.log(getMonthInYear(2000));
}
function testGetYear() {
console.log(getDaysInMonth(2000,1));
}
function today()
{
dateBS = DateBS.fromAD();
console.log(dateBS);
console.log(dateBS.toAD());
console.log(dateBS.financialYear());
}
function testServer()
{
data = {"dateAD":"2020-07-01"};
request = createPostRequest(data);
//console.log(request);
console.log(doPost(request));
request = createGetRequest(data);
//console.log(request);
console.log(doGet(request));
}
function testtoAD()
{
console.log(DateToAD("2077-03-30"))
}
function testtoBS()
{
console.log(DateToBS("2020-07-01"))
}
function testUserInfo()
{
console.log(Session.getActiveUser().getEmail());
}