tryParseMonth() — netty Function Reference
Architecture documentation for the tryParseMonth() function in DateFormatter.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8401dd32_c928_b3aa_2347_021ceb7e4e79["tryParseMonth()"] 868307e6_8dd7_9eb3_bb13_ca685c4d59cf["DateFormatter"] 8401dd32_c928_b3aa_2347_021ceb7e4e79 -->|defined in| 868307e6_8dd7_9eb3_bb13_ca685c4d59cf ccbf0bfc_8853_892e_8582_30ad6041b06a["parseToken()"] ccbf0bfc_8853_892e_8582_30ad6041b06a -->|calls| 8401dd32_c928_b3aa_2347_021ceb7e4e79 style 8401dd32_c928_b3aa_2347_021ceb7e4e79 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/DateFormatter.java lines 266–306
private boolean tryParseMonth(CharSequence txt, int tokenStart, int tokenEnd) {
int len = tokenEnd - tokenStart;
if (len != 3) {
return false;
}
char monthChar1 = AsciiString.toLowerCase(txt.charAt(tokenStart));
char monthChar2 = AsciiString.toLowerCase(txt.charAt(tokenStart + 1));
char monthChar3 = AsciiString.toLowerCase(txt.charAt(tokenStart + 2));
if (monthChar1 == 'j' && monthChar2 == 'a' && monthChar3 == 'n') {
month = Calendar.JANUARY;
} else if (monthChar1 == 'f' && monthChar2 == 'e' && monthChar3 == 'b') {
month = Calendar.FEBRUARY;
} else if (monthChar1 == 'm' && monthChar2 == 'a' && monthChar3 == 'r') {
month = Calendar.MARCH;
} else if (monthChar1 == 'a' && monthChar2 == 'p' && monthChar3 == 'r') {
month = Calendar.APRIL;
} else if (monthChar1 == 'm' && monthChar2 == 'a' && monthChar3 == 'y') {
month = Calendar.MAY;
} else if (monthChar1 == 'j' && monthChar2 == 'u' && monthChar3 == 'n') {
month = Calendar.JUNE;
} else if (monthChar1 == 'j' && monthChar2 == 'u' && monthChar3 == 'l') {
month = Calendar.JULY;
} else if (monthChar1 == 'a' && monthChar2 == 'u' && monthChar3 == 'g') {
month = Calendar.AUGUST;
} else if (monthChar1 == 's' && monthChar2 == 'e' && monthChar3 == 'p') {
month = Calendar.SEPTEMBER;
} else if (monthChar1 == 'o' && monthChar2 == 'c' && monthChar3 == 't') {
month = Calendar.OCTOBER;
} else if (monthChar1 == 'n' && monthChar2 == 'o' && monthChar3 == 'v') {
month = Calendar.NOVEMBER;
} else if (monthChar1 == 'd' && monthChar2 == 'e' && monthChar3 == 'c') {
month = Calendar.DECEMBER;
} else {
return false;
}
return true;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does tryParseMonth() do?
tryParseMonth() is a function in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/DateFormatter.java.
Where is tryParseMonth() defined?
tryParseMonth() is defined in codec-base/src/main/java/io/netty/handler/codec/DateFormatter.java at line 266.
What calls tryParseMonth()?
tryParseMonth() is called by 1 function(s): parseToken.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free