This article mainly introduces the use of ASP.net date format to capitalize Chinese characters, such as: "December 3, 2013" converted to "two 0 three years to pick up two days," the following to see how to achieve.
The same words not much said, directly on the code
Year converted to uppercase Kanji public
static string numtoupper (int num)
{return
"0 Woolu qi ba nine" [Num]. ToString ();
}
Month Conversion Capital Kanji public
static string monthtoupper (int month)
{
if (month < a)
{return
numtoupper ( month);
}
else
{
if (month = =) {return "a";}
else
{return
"one pick" + numtoupper (month-10);
}
}} The date is converted to uppercase Kanji public
static string daytoupper (int day)
{
if (Day <)
{return
monthtoupper (day);
}
else
{
String str = day. ToString ();
if (str[1] = = ' 0 ')
{return
numtoupper convert.toint16 (str[0). ToString ()) + "Pick up";
}
else
{return
numtoupper convert.toint16 (str[0). ToString ()) + "Pick up"
+ numtoupper (convert.toint16 (str[1). ToString ());}
}
static void Main (string[] args)
{
string year = "2013";
string retur = String. Empty;
for (int i = 0; i < year. Length; i++)
{
retur + = numtoupper (int. Parse (Year[i]. ToString ())). ToString ();
}
Console.WriteLine (Retur + "year");
Retur = string. Empty;
String month = "a";
Retur = Monthtoupper (Convert.ToInt32 (month));
Console.WriteLine (retur + "month");
String day = "3";
Retur = Daytoupper (Convert.ToInt32 (day));
Console.WriteLine (retur + "Day");
Console.ReadLine ();
}
The above is the use of asp.net date format into the full text of the Chinese characters, I hope this article on the content of the use of ASP.net can help.