> For the complete documentation index, see [llms.txt](https://educacion.gitbook.io/programacion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://educacion.gitbook.io/programacion/exercicios-java/ud3-exercicios/datas-e-horas.md).

# Datas e Horas

1. Define unha clase estática CalendarioUsuario que conte cos seguintes métodos estáticos:

   1. Un métodos que devolva a data e hora actual
   2. Un método que devolva a hora actual
   3. Un método que reciba unha data e un número de días, e devolva unha data que sexa a data + o número de días
   4. Un método que reciba dúas datas e que devolva a diferencia en dias entre elas
   5. Un método no que se introduza un ano e devolva cantos lunes ten.

   Escribe unha clase App que conteña un main no que se definan unha serie de datos que se pasen para realizar as probas de cada un dos métodos propostos


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://educacion.gitbook.io/programacion/exercicios-java/ud3-exercicios/datas-e-horas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
