Escribí un guión para hacer esto.
Para mostrarlo en la barra de menú, use BitBar . Una pequeña aplicación que crea elementos de la barra de menú a partir de la salida del script de shell.
Una vez que descargue BitBar, guarde el siguiente código en un archivo llamado lingualtime.1s.php
y luego señale BitBar donde lo guardó.
#!/usr/bin/env php
<?php
# <bitbar.title>Lingual Clock</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Stan Hutcheon</bitbar.author>
# <bitbar.author.github>stnvh</bitbar.author.github>
# <bitbar.desc>displays the current time in a sentence</bitbar.desc>
# <bitbar.dependencies>php</bitbar.dependencies>
$time = array_map(function($time) {
return intval($time);
}, explode(' ', date('g i')));
$st = array('hour' => '', 'minute' => '');
$past = '%s past %s'; $to = '%s to %s';
$pastHalf = false;
function get($int) {
$numbers = array(
1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six', 7 => 'seven', 8 => 'eight', 9 => 'nine',
11 => 'eleven', 12 => 'twelve', 13 => 'thirteen', 14 => 'fourteen', 15 => 'fifteen', 16 => 'sixteen', 17 => 'seventeen', 18 => 'eighteen', 19 => 'nineteen',
10 => 'ten', 20 => 'twenty', 30 => 'thirty', 40 => 'fourty', 50 => 'fifty'
);
return isset($numbers[$int]) ? $numbers[$int] : '';
}
if($time[1] >= 35) {
$pastHalf = true;
$time[0] = $time[0] === 12 ? 1 : ++$time[0];
$time[1] = 60 - $time[1];
}
# get lingual values
foreach(array('hour', 'minute') as $key => $part) {
if($time[$key] < 20) {
$st[$part] = get($time[$key]);
} else {
$currTenth = floor($time[$key] / 10) * 10;
$currRem = $time[$key] - $currTenth;
$ling = get($currTenth);
if($ext = get($currRem)) {
$ling .= '-' . $ext;
}
$st[$part] = $ling;
}
}
printf(($pastHalf ? $to : $past) . PHP_EOL, $st['minute'], $st['hour']);
Creo que la aplicación que estás buscando se llama Hora mundial . Es una aplicación paga ($1.99 USD) y debería hacer todo lo que tú quieras que haga. Sin embargo, no conozco ninguna alternativa gratuita.
Está viendo FuzzyClock, que es gratuito pero los desarrolladores ya no lo mantienen. Alojé la aplicación en caso de que alguien más la necesite. Todavía funciona en El Capitan: http://sayzlim.net/reading-time-on-mac-with-fuzzyclock/
morgan
bmike