<commit_before>/*
    This file is part of libkholidays.
    Copyright (c) 2004 <NAME> <<EMAIL>>

    Copyright (c) 1989, 1993
    The Regents of the University of California.  All rights reserved.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    In addition, as a special exception, the copyright holders give
    permission to link the code of this program with any edition of
    the Qt library by Trolltech AS, Norway (or with modified versions
    of Qt that use the same license as Qt), and distribute linked
    combinations including the two.  You must obey the GNU General
    Public License in all respects for all of the code used other than
    Qt.  If you modify this file, you may extend this exception to
    your version of the file, but you are not obligated to do so.  If
    you do not wish to do so, delete this exception statement from
    your version.
*/

#include "config.h"

#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>

#include "lunarphase.h"

LunarPhase::LunarPhase( Hemisphere hemisphere )
{
  mHemisphere = hemisphere;
}

LunarPhase::~LunarPhase()
{
}

void LunarPhase::setHemisphere( Hemisphere hemisphere )
{
  mHemisphere = hemisphere;
}

LunarPhase::Hemisphere LunarPhase::hemisphere() const
{
  return( mHemisphere );
}

QString LunarPhase::hemisphereStr() const
{
  return hemisphereName( mHemisphere );
}

QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere )
{
  switch( hemisphere ) {
  case Northern:
  default:
    return( i18n( "Northern" ) );
    break;
  case Southern:
    return( i18n( "Southern" ) );
    break;
  }
}

QString LunarPhase::phaseStr( const QDate &date ) const
{
  return phaseName( phase( date ) );
}

QString LunarPhase::phaseName( LunarPhase::Phase phase )
{
  switch ( phase ) {
  case New:
    return( i18n( "New Moon" ) );
    break;
  case Full:
    return( i18n( "Full Moon" ) );
    break;
  case FirstQ:
    return( i18n( "First Quarter Moon" ) );
    break;
  case LastQ:
    return( i18n( "Last Quarter Moon" ) );
    break;
  default:
  case None:
    return( QString() );
    break;<commit_msg>Fix compilation.<commit_after>/*
    This file is part of libkholidays.
    Copyright (c) 2004 <NAME> <<EMAIL>>

    Copyright (c) 1989, 1993
    The Regents of the University of California.  All rights reserved.

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    In addition, as a special exception, the copyright holders give
    permission to link the code of this program with any edition of
    the Qt library by Trolltech AS, Norway (or with modified versions
    of Qt that use the same license as Qt), and distribute linked
    combinations including the two.  You must obey the GNU General
    Public License in all respects for all of the code used other than
    Qt.  If you modify this file, you may extend this exception to
    your version of the file, but you are not obligated to do so.  If
    you do not wish to do so, delete this exception statement from
    your version.
*/

#include "config.h"

#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>

#include "lunarphase.h"

LunarPhase::LunarPhase( Hemisphere hemisphere )
{
  mHemisphere = hemisphere;
}

LunarPhase::~LunarPhase()
{
}

void LunarPhase::setHemisphere( Hemisphere hemisphere )
{
  mHemisphere = hemisphere;
}

LunarPhase::Hemisphere LunarPhase::hemisphere() const
{
  return( mHemisphere );
}

QString LunarPhase::hemisphereStr() const
{
  return hemisphereName( mHemisphere );
}

QString LunarPhase::hemisphereName( LunarPhase::Hemisphere hemisphere )
{
  switch( hemisphere ) {
  case Northern:
  default:
    return( i18n( "Northern" ) );
    break;
  case Southern:
    return( i18n( "Southern" ) );
    break;
  }
}

QString LunarPhase::phaseStr( const QDate &date ) const
{
  return phaseName( phase( date ) );
}

QString LunarPhase::phaseName( LunarPhase::Phase phase )
{
  switch ( phase ) {
  case New:
    return( i18n( "New Moon" ) );
    break;
  case Full:
    return( i18n( "Full Moon" ) );
    break;
  case FirstQ:
    return( i18n( "First Quarter Moon" ) );
    break;
  case LastQ:
    return( i18n( "Last Quarter Moon" ) );
    break;
  default:
  case None:
    return QString();
    break;
{'fraction_non_alphanumeric': 0.07663316582914573, 'fraction_numerical': 0.012921751615218953, 'mean_word_length': 3.423015873015873, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3921557', 'n_tokens_mistral': 1762, 'n_tokens_neox': 1648, 'n_words': 702}