Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat: add `.duration` and `.time_ago` inline styles

Abierto
#814 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
r
Área
cli

Línea de trabajo

Start by reading R/time.R and R/time-ago.R, then inspect how the existing .bytes feature from #740 is wired into user_themes and inline styles. Add .duration and .time_ago formatting for the examples in the issue, and verify both styles work without external dependencies.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature

find myself frequently formatting elapsed times and relative timestamps when building clis and storing them in the user_themes option, it would be useful to support these out of the box.

  • .duration : format seconds/timediff as human-readable duration
    i.e {.duration {elapsed}} -> [2m 3s] / [42s]
  • .time_ago : format as relative time string
    i.e {.time_ago {ts}} -> "2 minutes ago"

both can take advantage of vendored formatters in the package R/time.R and R/time-ago.R without dependencies, and would be consistent with the .bytes feature from #740

Lenguaje dominante
R
Estrellas
730
Forks
94
Merge medio
6 d 16 h
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de r-lib/cli

Todos los issues de r-lib/cli

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.