Commit 038d9863 authored by Simon's avatar Simon

Merge branch 'posting-logic' into dev

parents aa276d31 a9d33715
......@@ -71,7 +71,7 @@
}
}
.c-jobs--col-valid { color: #19C5A7; white-space: nowrap; padding-right: 15px; padding-left: 5px; width: 100px;
.c-jobs--col-valid { color: #19C5A7; white-space: nowrap; padding-right: 15px; padding-left: 5px; width: 100px; text-align: right;
@media (--max--medium) {
width: 50%; border-bottom: 1px solid var(--color--gray-light); font-size: 13px; padding-top: 0; text-align: right;
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -63,7 +63,7 @@
/******/
/******/ var hotApplyOnUpdate = true;
/******/ // eslint-disable-next-line no-unused-vars
/******/ var hotCurrentHash = "13ac53576f1ab8298594";
/******/ var hotCurrentHash = "53e362353d011a12ee31";
/******/ var hotRequestTimeout = 10000;
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentChildModule;
......
......@@ -18,14 +18,25 @@ function showPosted($published, $valid) {
if ($published == $today) :
_e('Today', 'biuro');
else:
$earlier = new DateTime($today);
$later = new DateTime($valid);
$count = $later->diff($earlier)->format("%a");
$now = new DateTime($today);
$till = new DateTime($valid);
$count = $till->diff($now)->format("%a") + 1;
if ($count < 4):
printf( __( 'Left %1$s d.!', 'biuro' ), $count ); // Liko 2 d.!
// printf( __( 'Left %1$s d.!', 'biuro' ), $count ); // Liko 2 d.!
printf( _n( '%d day left!', '%d days left!', $count, 'biuro' ), $count );
else:
printf( __( 'Before %s d.', 'biuro' ), $count ); // Prieš 28 d.
$count = $now->diff(new DateTime($published))->format("%a");
printf( _n( '%d day ago', '%d days ago', $count, 'biuro' ), $count );
// printf( __( 'Before %s d.', 'biuro' ), $count ); // Prieš 28 d.
// 1 day ago
// 2 days ago
endif;
endif;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment