Skip to content

addyear addmonth addday #5

@miladr

Description

@miladr

please add these functions(if you don't have better solution):

public function addyear($j_y, $j_m, $j_d, $add_y) {
$gdate = $this->toGregorian($j_y, $j_m, $j_d);
$gdate[0]+=$add_y;
return $this->toJalali($gdate[0], $gdate[1], $gdate[2]);
}

public function addmonth($j_y, $j_m, $j_d, $add_m) {
    $gdate = $this->toGregorian($j_y, $j_m, $j_d);
    $gdate[1]+=$add_m;
    return $this->toJalali($gdate[0], $gdate[1], $gdate[2]);
}

public function addday($j_y, $j_m, $j_d, $add_d) {
    $gdate = $this->toGregorian($j_y, $j_m, $j_d);
    $gdate[2]+=$add_d;
    return $this->toJalali($gdate[0], $gdate[1], $gdate[2]);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions