Autopsy  4.20.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
MonthAbbreviation.java
Go to the documentation of this file.
1 /*
2  * Autopsy
3  *
4  * Copyright 2020 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.discovery.ui;
20 
21 import org.openide.util.NbBundle;
22 
26 @NbBundle.Messages({
27  "MonthAbbreviation.januraryAbbrev=Jan",
28  "MonthAbbreviation.feburaryAbbrev=Feb",
29  "MonthAbbreviation.marchAbbrev=Mar",
30  "MonthAbbreviation.aprilAbbrev=Apr",
31  "MonthAbbreviation.mayAbbrev=May",
32  "MonthAbbreviation.juneAbbrev=Jun",
33  "MonthAbbreviation.julyAbbrev=Jul",
34  "MonthAbbreviation.augustAbbrev=Aug",
35  "MonthAbbreviation.septemberAbbrev=Sep",
36  "MonthAbbreviation.octoberAbbrev=Oct",
37  "MonthAbbreviation.novemberAbbrev=Nov",
38  "MonthAbbreviation.decemberAbbrev=Dec"
39 })
40 public enum MonthAbbreviation {
41  JANURARY(Bundle.MonthAbbreviation_januraryAbbrev()),
42  FEBURARY(Bundle.MonthAbbreviation_feburaryAbbrev()),
43  MARCH(Bundle.MonthAbbreviation_marchAbbrev()),
44  APRIL(Bundle.MonthAbbreviation_aprilAbbrev()),
45  MAY(Bundle.MonthAbbreviation_mayAbbrev()),
46  JUNE(Bundle.MonthAbbreviation_juneAbbrev()),
47  JULY(Bundle.MonthAbbreviation_julyAbbrev()),
48  AUGUST(Bundle.MonthAbbreviation_augustAbbrev()),
49  SEPTEMBER(Bundle.MonthAbbreviation_septemberAbbrev()),
50  OCTOBER(Bundle.MonthAbbreviation_octoberAbbrev()),
51  NOVEMBER(Bundle.MonthAbbreviation_novemberAbbrev()),
52  DECEMBER(Bundle.MonthAbbreviation_decemberAbbrev());
53 
54  private final String abbreviation;
55 
56  MonthAbbreviation(String abbreviation) {
57  this.abbreviation = abbreviation;
58  }
59 
60  @Override
61  public String toString() {
62  return this.abbreviation;
63  }
64 
71  public static MonthAbbreviation fromMonthValue(int value) {
72  MonthAbbreviation[] months = MonthAbbreviation.values();
73  for(int i = 0; i < months.length; i++) {
74  if (i + 1 == value) {
75  return months[i];
76  }
77  }
78  return null;
79  }
80 }
static MonthAbbreviation fromMonthValue(int value)

Copyright © 2012-2022 Basis Technology. Generated on: Tue Aug 1 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.