{"id":1025,"date":"2025-10-04T14:57:44","date_gmt":"2025-10-04T14:57:44","guid":{"rendered":"https:\/\/javigomez.org\/?p=1025"},"modified":"2025-12-05T16:52:38","modified_gmt":"2025-12-05T16:52:38","slug":"e1-29-validador-de-fechas","status":"publish","type":"post","link":"https:\/\/javigomez.org\/index.php\/2025\/10\/04\/e1-29-validador-de-fechas\/","title":{"rendered":"E1.29 Validador de fechas"},"content":{"rendered":"\n<p>\u00a0Leer tres n\u00fameros que denoten una fecha (d\u00eda, mes, a\u00f1o). Comprobar que es una fecha v\u00e1lida. Si no es v\u00e1lida escribir un mensaje de error. Si es v\u00e1lida escribir la fecha cambiando el n\u00famero del mes por su nombre. Ej. si se introduce 1 2 2006, se deber\u00e1 imprimir \u201c1 de febrero de 2006\u201d. El a\u00f1o debe ser mayor que 0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Algoritmo sin_titulo\n\t\/\/Actividad 1.29: Leer tres n\u00fameros que denoten una fecha (d\u00eda, mes, a\u00f1o). \n\t\/\/Comprobar que es una fecha v\u00e1lida. Si no es v\u00e1lida escribir un mensaje de error. \n\t\/\/Si es v\u00e1lida escribir la fecha cambiando el n\u00famero del mes por su nombre. \n\t\/\/Ej. si se introduce 1 2 2006, se deber\u00e1 imprimir \"1 de febrero de 2006\". \n\t\/\/El a\u00f1o debe ser mayor que 0\n\t\n\tEscribir \"Dia: \"\n\tleer dd\n\tEscribir \"Mes: \"\n\tleer mm\n\tEscribir \"A\u00f1o: \"\n\tleer aa\n\t\n\tm=\"\"\n\tmax=0\n\t\n\tSegun mm Hacer\n\t\t1:\n\t\t\tm=\"Enero\"\n\t\t\tmax=31\n\t\t2:\n\t\t\tm=\"Febrero\"\n\t\t\tmax=28\n\t\t3:\n\t\t\tm=\"Marzo\"\n\t\t\tmax=31\n\t\t4:\n\t\t\tm=\"Abril\"\n\t\t\tmax=30\n\t\t5:\n\t\t\tm=\"Mayo\"\n\t\t\tmax=31\n\t\t6:\n\t\t\tm=\"Junio\"\n\t\t\tmax=30\n\t\t7:\n\t\t\tm=\"Julio\"\n\t\t\tmax=31\n\t\t8:\n\t\t\tm=\"Agosto\"\n\t\t\tmax=31\n\t\t9:\n\t\t\tm=\"Septiembre\"\n\t\t\tmax=30\n\t\t10:\n\t\t\tm=\"Octubre\"\n\t\t\tmax=31\n\t\t11:\n\t\t\tm=\"Noviembre\"\n\t\t\tmax=30\n\t\t12:\n\t\t\tm=\"Diciembre\"\n\t\t\tmax=31\n\t\tDe Otro Modo:\n\t\t\tmax=0\n\tFinSegun\n\t\n\tsi dd>max o max=0 o aa&lt;=0 Entonces\n\t\tEscribir \"Fecha erronea\"\n\tSiNo\n\t\tEscribir dd \" de \" m \" de \" aa\n\tFinSi\n\t\nFinAlgoritmo\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"E0129 Validador de fechas\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/LxqUcgcWqcY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0Leer tres n\u00fameros que denoten una fecha (d\u00eda, mes, a\u00f1o). Comprobar que es una fecha v\u00e1lida. Si no es v\u00e1lida escribir un mensaje de error. &hellip; <\/p>\n","protected":false},"author":1,"featured_media":1026,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[271,272],"class_list":["post-1025","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pseint-pseudocodigo","tag-pseint","tag-pseudocodigo"],"_links":{"self":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/comments?post=1025"}],"version-history":[{"count":2,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions"}],"predecessor-version":[{"id":1028,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions\/1028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media\/1026"}],"wp:attachment":[{"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/media?parent=1025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/categories?post=1025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javigomez.org\/index.php\/wp-json\/wp\/v2\/tags?post=1025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}