-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNepDate.cs
45 lines (38 loc) · 1.05 KB
/
NepDate.cs
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
using System;
using System.Collections.Generic;
using System.Text;
namespace nepdate
{
public class NepDate
{
public int Year { get; set; }
public int Month { get; set; }
public int Day { get; set; }
private string _weekDayName;
public string WeekDayName
{
get { return _weekDayName; }
set { _weekDayName = value; }
}
public string MonthName { get; set; }
public int WeekDay { get; set; }
public override string ToString()
{
return string.Format("{0}/{1}/{2}", Year, Month, Day);
}
public string ToLongDateString()
{
return string.Format("{0}, {1} {2}, {3}", WeekDayName, MonthName, Day, Year);
}
public string ToLongsDateString()
{
return string.Format("{0} {1}, {2}", MonthName, Day, Year);
}
public void setNepDate(int yr, int mth, int day)
{
Year = yr;
Month = mth;
Day = day;
}
}
}