File indexing completed on 2024-05-05 05:48:31

0001 /*
0002     CT Month Header
0003     --------------------------------------------------------------------
0004     SPDX-FileCopyrightText: 1999 Gary Meyer <gary@meyer.net>
0005     --------------------------------------------------------------------
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include <QList>
0012 #include <QString>
0013 
0014 #include "ctunit.h"
0015 
0016 /**
0017  * Scheduled task months.
0018  */
0019 class CTMonth : public CTUnit
0020 {
0021 public:
0022     /**
0023      * Constructs from a tokenized string.
0024      */
0025     explicit CTMonth(const QString &tokStr = QLatin1String(""));
0026 
0027     /**
0028      * Get natural language description.
0029      */
0030     virtual QString describe() const;
0031 
0032     /**
0033      * Get month name.
0034      */
0035     static QString getName(const int ndx);
0036 
0037     static const int MINIMUM = 1;
0038     static const int MAXIMUM = 12;
0039 
0040 private:
0041     static void initializeNames();
0042     static QList<QString> shortName;
0043 };
0044