Supermarket Managemet System/main.cpp
bool CompareUsingProductionDateAscending( Product FirstProduct, Product SecondProduct)
{
    if((FirstProduct.ProductionDate.Year < SecondProduct.ProductionDate.Year)||((FirstProduct.ProductionDate.Year == SecondProduct.ProductionDate.Year)&&(FirstProduct.ProductionDate.Month < SecondProduct.ProductionDate.Month))||(((FirstProduct.ProductionDate.Year == SecondProduct.ProductionDate.Year)&&(FirstProduct.ProductionDate.Month == SecondProduct.ProductionDate.Month))&&(FirstProduct.ProductionDate.Day < SecondProduct.ProductionDate.Day)))
        return 1;
    else
        return 0;
}
//Used to Compare products using there production date in ascending order
Used to Compare products using there production date in ascending order
Used to Compare products using there production date in ascending order
bool CompareUsingProductionDateAscending( Product FirstProduct, Product SecondProduct)
{
    if((FirstProduct.ProductionDate.Year < SecondProduct.ProductionDate.Year)||((FirstProduct.ProductionDate.Year == SecondProduct.ProductionDate.Year)&&(FirstProduct.ProductionDate.Month < SecondProduct.ProductionDate.Month))||(((FirstProduct.ProductionDate.Year == SecondProduct.ProductionDate.Year)&&(FirstProduct.ProductionDate.Month == SecondProduct.ProductionDate.Month))&&(FirstProduct.ProductionDate.Day < SecondProduct.ProductionDate.Day)))
        return 1;
    else
        return 0;
}
bool CompareUsingProductionDateAscending ( Product FirstProduct , Product SecondProduct ) { if ( ( FirstProduct . ProductionDate . Year < SecondProduct . ProductionDate . Year ) || ( ( FirstProduct . ProductionDate . Year == SecondProduct . ProductionDate . Year ) && ( FirstProduct . ProductionDate . Month < SecondProduct . ProductionDate . Month ) ) || ( ( ( FirstProduct . ProductionDate . Year == SecondProduct . ProductionDate . Year ) && ( FirstProduct . ProductionDate . Month == SecondProduct . ProductionDate . Month ) ) && ( FirstProduct . ProductionDate . Day < SecondProduct . ProductionDate . Day ) ) ) return 1 ; else return 0 ; }
Used to Compare products using there production date in ascending order
Used to Compare products using there production date in ascending order