this
.TextBox1.Text = System.DateTime.Now.ToString(
"D"
);
this
.TextBox2.Text = System.DateTime.Now.ToString(
"d"
);
this
.TextBox3.Text = System.DateTime.Now.ToString(
"F"
);
this
.TextBox4.Text = System.DateTime.Now.ToString(
"f"
);
this
.TextBox5.Text = System.DateTime.Now.ToString(
"G"
);
this
.TextBox6.Text = System.DateTime.Now.ToString(
"g"
);
this
.TextBox7.Text = System.DateTime.Now.ToString(
"T"
);
this
.TextBox8.Text = System.DateTime.Now.ToString(
"t"
);
this
.TextBox9.Text = System.DateTime.Now.ToString(
"U"
);
this
.TextBox10.Text = System.DateTime.Now.ToString(
"u"
);
this
.TextBox11.Text = System.DateTime.Now.ToString(
"m"
);
this
.TextBox12.Text = System.DateTime.Now.ToString(
"M"
);
this
.TextBox13.Text = System.DateTime.Now.ToString(
"r"
);
this
.TextBox14.Text = System.DateTime.Now.ToString(
"R"
);
this
.TextBox15.Text = System.DateTime.Now.ToString(
"y"
);
this
.TextBox16.Text = System.DateTime.Now.ToString(
"Y"
);
this
.TextBox17.Text = System.DateTime.Now.ToString(
"o"
);
this
.TextBox18.Text = System.DateTime.Now.ToString(
"O"
);
this
.TextBox19.Text = System.DateTime.Now.ToString(
"s"
);
this
.TextBox20.Text = System.DateTime.Now.ToString(
"yyyy-MM-dd HH:mm:ss:ffff"
);
this
.TextBox21.Text = System.DateTime.Now.ToString(
"yyyy年MM月dd HH时mm分ss秒"
);
this
.TextBox22.Text = System.DateTime.Now.ToString(
"dddd, MMMM dd yyyy"
);
this
.TextBox23.Text = System.DateTime.Now.ToString(
"ddd, MMM d "'"yy"
);
this
.TextBox24.Text = System.DateTime.Now.ToString(
"dddd, MMMM dd"
);
this
.TextBox25.Text = System.DateTime.Now.ToString(
"M/yy"
);
this
.TextBox26.Text = System.DateTime.Now.ToString(
"dd-MM-yy"
);
string
[] Day =
new
string
[] {
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
};
this
.TextBox1.Text = System.DateTime.Now.AddDays(-1).ToShortDateString();
this
.TextBox2.Text = DateTime.Now.AddDays(1).ToShortDateString();
this
.TextBox3.Text = DateTime.Now.AddDays(Convert.ToDouble((0 - Convert.ToInt16(DateTime.Now.DayOfWeek)))).ToShortDateString();
this
.TextBox4.Text = DateTime.Now.AddDays(Convert.ToDouble((6 - Convert.ToInt16(DateTime.Now.DayOfWeek)))).ToShortDateString();
this
.TextBox5.Text = Day[Convert.ToInt16(DateTime.Now.DayOfWeek)];
this
.TextBox6.Text = DateTime.Now.AddDays(Convert.ToDouble((0 - Convert.ToInt16(DateTime.Now.DayOfWeek))) - 7).ToShortDateString();
this
.TextBox7.Text = DateTime.Now.AddDays(Convert.ToDouble((6 - Convert.ToInt16(DateTime.Now.DayOfWeek))) - 7).ToShortDateString();
this
.TextBox8.Text = DateTime.Now.AddDays(Convert.ToDouble((0 - Convert.ToInt16(DateTime.Now.DayOfWeek))) + 7).ToShortDateString();
this
.TextBox9.Text = DateTime.Now.AddDays(Convert.ToDouble((6 - Convert.ToInt16(DateTime.Now.DayOfWeek))) + 7).ToShortDateString();
this
.TextBox10.Text =DateTime.Now.ToString(
"yyyy-MM-01"
);
this
.TextBox11.Text=DateTime.Parse(DateTime.Now.ToString(
"yyyy-MM-01"
)).AddMonths(1).AddDays(-1).ToShortDateString();
this
.TextBox12.Text=System.DateTime.Parse(DateTime.Now.ToString(
"yyyy-MM-01"
)).AddMonths(-1).ToShortDateString();
this
.TextBox13.Text=System.DateTime.Parse(DateTime.Now.ToString(
"yyyy-MM-01"
)).AddMonths(1).ToShortDateSring();